chenjunkai 5 年之前
父節點
當前提交
159b534965
共有 1 個文件被更改,包括 4 次插入3 次删除
  1. 4 3
      Controller/UserController.py

+ 4 - 3
Controller/UserController.py

@@ -2088,9 +2088,10 @@ class V2LogoutView(TemplateView):
             os_type = request_dict.get('os_type', None)
             appid = request_dict.get('appid', None)
             udid = request_dict.get('udid', None)
-            tutk_push_url = "{tutk_push_domain}?cmd=mapsync&os={os_type}&appid={appid}&udid={udid}".format(
-                os_type=os_type, appid=appid, udid=udid,tutk_push_domain=TUTK_PUSH_DOMAIN)
-            res = requests.get(url=tutk_push_url)
+            if os_type and appid and udid:
+                tutk_push_url = "{tutk_push_domain}?cmd=mapsync&os={os_type}&appid={appid}&udid={udid}".\
+                    format(os_type=os_type, appid=appid, udid=udid,tutk_push_domain=TUTK_PUSH_DOMAIN)
+                res = requests.get(url=tutk_push_url)
             return response.json(0)
         else:
             return response.json(tko.code)