summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2023-04-11 16:08:37 +0700
committerstephanchrst <stephanchrst@gmail.com>2023-04-11 16:08:37 +0700
commita854c5cca6e374589449e54a2fb9efb7f2c24955 (patch)
tree077d71f532eaee051f0b7bb17de73f645a58677d
parenta581095da416f586dd1bceba148cc1d0a4022976 (diff)
fix typo parsing ip
-rw-r--r--indoteknik_custom/models/ip_lookup.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/indoteknik_custom/models/ip_lookup.py b/indoteknik_custom/models/ip_lookup.py
index 9c4beda9..a708cd94 100644
--- a/indoteknik_custom/models/ip_lookup.py
+++ b/indoteknik_custom/models/ip_lookup.py
@@ -49,7 +49,7 @@ class IpLookup(models.Model):
if last_data:
log.lookup = last_data.lookup
country = json.loads(last_data.lookup)['country']
- timezone = json.loads(last_data)['timezone']
+ timezone = json.loads(last_data.lookup)['timezone']
_logger.info('Parsing IP using last data %s' % log.id)
else:
ipinfo = requests.get('http://ip-api.com/json/%s' % log.ip_address).json()