Skip to content

Commit ca5216b

Browse files
committed
get country from ip_info
1 parent 773d778 commit ca5216b

File tree

1 file changed

+1
-1
lines changed
  • src/flask_track_usage/storage

1 file changed

+1
-1
lines changed

src/flask_track_usage/storage/sql.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def store(self, data):
149149
remote_addr=data["remote_addr"],
150150
xforwardedfor=data["xforwardedfor"],
151151
authorization=data["authorization"],
152-
country=data["country"],
152+
country=data["ip_info"].get('country', None),
153153
ip_info=data["ip_info"],
154154
path=data["path"],
155155
speed=data["speed"],

0 commit comments

Comments
 (0)