chenjunkai 6 years ago
parent
commit
30a494c512
2 changed files with 2 additions and 3 deletions
  1. 1 1
      Controller/UserController.py
  2. 1 2
      Object/TokenObject.py

+ 1 - 1
Controller/UserController.py

@@ -491,7 +491,7 @@ class refreshTokenView(TemplateView):
         token = request_dict.get('token', None)
         token = request_dict.get('token', None)
         lang = request_dict.get('lang', None)
         lang = request_dict.get('lang', None)
         language = request_dict.get('language', None)
         language = request_dict.get('language', None)
-        if language:
+        if language is not None:
             lang = language
             lang = language
         response = ResponseObject(lang)
         response = ResponseObject(lang)
         if token is not None:
         if token is not None:

+ 1 - 2
Object/TokenObject.py

@@ -107,7 +107,6 @@ class TokenObject:
         else:
         else:
             self.code = 0
             self.code = 0
             userID = res.get('userID', '')
             userID = res.get('userID', '')
-            lang = res.get('lang', '')
             user = res.get('user', '')
             user = res.get('user', '')
-            refreshRes = self.generate(data={'userID': userID, 'lang': lang, 'user': user})
+            refreshRes = self.generate(data={'userID': userID, 'lang': self.lang, 'user': user})
             return refreshRes
             return refreshRes