fix: 修复用户登录失败未记录日志的问题

This commit is contained in:
Michael Bai
2021-10-19 15:10:18 +08:00
committed by 老广
parent 63638ed1ce
commit af2a9bb1e6
3 changed files with 9 additions and 8 deletions

View File

@@ -111,8 +111,7 @@ class UserLoginView(mixins.AuthMixin, FormView):
self.request.session.delete_test_cookie()
try:
with transaction.atomic():
self.check_user_auth(decrypt_passwd=True)
self.check_user_auth(decrypt_passwd=True)
except errors.AuthFailedError as e:
form.add_error(None, e.msg)
self.set_login_failed_mark()