Merge pull request #3586 from jumpserver/dev_bai

[Bugfix] 修改BlockLoginError的msg值在初始化中设置(数据表没生成之前启动会有问题)
pull/3591/head
BaiJiangJie 5 years ago committed by GitHub
commit 1d7bdd5f5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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