[Bugfix] 修改BlockLoginError的msg值在初始化中设置(数据表没生成之前启动会有问题)

pull/3586/head
BaiJiangJie 5 years ago
parent ce3cc80037
commit 8702761303

@ -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)

Loading…
Cancel
Save