fix: One login lock, resulting in two logs

This commit is contained in:
wangruidong
2025-11-20 14:43:04 +08:00
committed by Jiangjie Bai
parent 16c79f59a7
commit 9e150b7fbe

View File

@@ -211,7 +211,7 @@ class AuthPreCheckMixin:
logger.warning('Ip was blocked' + ': ' + username + ':' + ip)
exception = errors.BlockLoginError(username=username, ip=ip, request=self.request)
if raise_exception:
raise errors.BlockLoginError(username=username, ip=ip, request=self.request)
raise exception
else:
return exception