소스 검색

修改get_district函数;

keiSenFront 2 년 전
부모
커밋
6058fdcfd3
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      Controller/ShadowController.py

+ 1 - 1
Controller/ShadowController.py

@@ -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