peng 11 сар өмнө
parent
commit
b712ed560f

+ 2 - 2
Controller/UserController.py

@@ -3577,7 +3577,7 @@ class SingleLoginView(TemplateView):
         user_qs.update(userEmail=email, password=password)
         if not reds.del_data(key):
             return response.json(10, '删除缓存失败')
-        key = 'token_user_{}_{}'.format(user_qs[0].userID, new_bundle)
+        key = 'token_user_{}_{}'.format(user_id, new_bundle)
         LOGGER.info('{}修改密码写入token:{}'.format(user_id, 'temp_value'))
         reds.set_data(key, 'temp_value')
         push_url = '{}transparent-transmission/logout-push'.format(DETECT_PUSH_DOMAINS)
@@ -3615,7 +3615,7 @@ class SingleLoginView(TemplateView):
         user_qs.update(phone=phone, password=password)
         if not reds.del_data(key):
             return response.json(10, '删除缓存失败')
-        key = 'token_user_{}_{}'.format(user_qs[0].userID, new_bundle)
+        key = 'token_user_{}_{}'.format(user_id, new_bundle)
         LOGGER.info('{}修改密码写入token:{}'.format(user_id, 'temp_value'))
         reds.set_data(key, 'temp_value')
         push_url = '{}transparent-transmission/logout-push'.format(DETECT_PUSH_DOMAINS)