We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0969f70 commit cf91734Copy full SHA for cf91734
apps/users/serializers/login.py
@@ -76,12 +76,12 @@ def login(instance):
76
except Exception:
77
auth_setting = {}
78
79
- max_attempts = auth_setting.get("max_attempts", 0)
+ max_attempts = auth_setting.get("max_attempts", 1)
80
password = instance.get("password")
81
captcha = instance.get("captcha", "")
82
83
# 判断是否需要验证码
84
- need_captcha = True
+ need_captcha = False
85
if max_attempts == -1:
86
need_captcha = False
87
elif max_attempts > 0:
0 commit comments