Explorar el Código

解决苹果绑定接口异常1

tanghongbin hace 4 años
padre
commit
cfd00c0119
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      Controller/UserController.py

+ 1 - 1
Controller/UserController.py

@@ -2902,7 +2902,7 @@ class Image_Code_RegisterView(TemplateView):
         # redis里面的验证码
         # redis里面的验证码
         redis_image_code = redisObj.get_data(key=image_code_key)
         redis_image_code = redisObj.get_data(key=image_code_key)
         # 验证用户输入的验证码和redis中的验证码
         # 验证用户输入的验证码和redis中的验证码
-        if valid_code.lower() != redis_image_code.lower():
+        if redis_image_code is False or valid_code.lower() != redis_image_code.lower():
             return response.json(121)
             return response.json(121)
         # 删除redis中的图片验证码,防止用户使用同一个图片验证码验证多次
         # 删除redis中的图片验证码,防止用户使用同一个图片验证码验证多次
         redisObj.del_data(key=image_code_key)
         redisObj.del_data(key=image_code_key)