From 87027613034a8862e5bf5bd6f4972f11bb576e4e Mon Sep 17 00:00:00 2001 From: BaiJiangJie Date: Thu, 2 Jan 2020 16:24:13 +0800 Subject: [PATCH] =?UTF-8?q?[Bugfix]=20=E4=BF=AE=E6=94=B9BlockLoginError?= =?UTF-8?q?=E7=9A=84msg=E5=80=BC=E5=9C=A8=E5=88=9D=E5=A7=8B=E5=8C=96?= =?UTF-8?q?=E4=B8=AD=E8=AE=BE=E7=BD=AE=EF=BC=88=E6=95=B0=E6=8D=AE=E8=A1=A8?= =?UTF-8?q?=E6=B2=A1=E7=94=9F=E6=88=90=E4=B9=8B=E5=89=8D=E5=90=AF=E5=8A=A8?= =?UTF-8?q?=E4=BC=9A=E6=9C=89=E9=97=AE=E9=A2=98=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/authentication/errors.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/authentication/errors.py b/apps/authentication/errors.py index 9054568d8..b736ef606 100644 --- a/apps/authentication/errors.py +++ b/apps/authentication/errors.py @@ -118,9 +118,9 @@ class MFAFailedError(AuthFailedNeedLogMixin, AuthFailedError): class BlockLoginError(AuthFailedNeedBlockMixin, AuthFailedError): error = 'block_login' - msg = block_login_msg.format(settings.SECURITY_LOGIN_LIMIT_TIME) def __init__(self, username, ip): + self.msg = block_login_msg.format(settings.SECURITY_LOGIN_LIMIT_TIME) super().__init__(username=username, ip=ip)