فهرست منبع

登录更新网关推送表的登出状态

locky 3 سال پیش
والد
کامیت
9fdcee6c0b
1فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 3 1
      Controller/UserController.py

+ 3 - 1
Controller/UserController.py

@@ -2027,7 +2027,9 @@ class v3LoginView(TemplateView):
         tz = request_dict.get('tz', None)
         if all([app_bundle_id, app_type, push_type, token_val, m_code, tz]):
             gateway_push_qs = GatewayPush.objects.filter(user_id=userID, m_code=m_code)
-            if not gateway_push_qs.exists():
+            if gateway_push_qs.exists():
+                gateway_push_qs.update(logout=False)
+            else:
                 GatewayPush.objects.create(user_id=userID, app_bundle_id=app_bundle_id, app_type=app_type,
                                            push_type=push_type, token_val=token_val, m_code=m_code, lang=lang, tz=tz)