pzb 6 жил өмнө
parent
commit
b5d439d875

+ 20 - 1
Controller/UserBrandController.py

@@ -100,11 +100,30 @@ class UserBrandInfo(View):
         longitude = request_dict.get('longitude', None)
         latitude = request_dict.get('latitude', None)
         appId = request_dict.get('appId', None)
-        param_area = CommonService.get_param_flag(data=[country])
+
+        if country is None:
+            country=''
+        if province is None:
+            province=''
+        if city is None:
+            city = ''
+        if area is None:
+            area=''
+        if street is None:
+            street=''
+        if longitude is None:
+            longitude=''
+        if latitude is None:
+            latitude=''
+        param_area = CommonService.get_param_flag(data=[country,province,city,longitude,latitude])
         must_fill_in = CommonService.get_param_flag(data=[appId,deviceSupplier,deviceModel,osType,osVersion])
         if must_fill_in is False:
             return response.json(444,'appId,deviceSupplier,deviceModel,osType,osVersion')
         if  param_area is True:
+            if '省' in province:
+                province = province.replace('省','')
+            if '市' in city:
+                city = city.replace('市','')
             status = 1
             country = country
             province = province