Selaa lähdekoodia

修改地区返回值

linhaohong 1 vuosi sitten
vanhempi
commit
67f36a20d1
1 muutettua tiedostoa jossa 3 lisäystä ja 1 poistoa
  1. 3 1
      Object/IPWeatherObject.py

+ 3 - 1
Object/IPWeatherObject.py

@@ -55,7 +55,9 @@ class IPQuery:
                 else:
                     IPAddr.objects.create(ip=ip, district=district, city=city, region=region, country_code=country_id)
 
-                # 确定天气城市
+                self.city = city  # 市
+                self.region = region  # 省/州
+
                 if district != '':
                     self.district = district
                 elif city != '':