|
@@ -183,7 +183,7 @@ def get_district(ip):
|
|
|
else:
|
|
|
ip_qs = IPQuery(ip)
|
|
|
district = ip_qs.district
|
|
|
- country_code = ip.country_id
|
|
|
+ country_code = ip_qs.country_id
|
|
|
# ip地址信息存表
|
|
|
IPAddr.objects.create(ip=ip, country_code=country_code, district=district)
|
|
|
return district
|