update applications/view/passport/__init__.py.
This commit is contained in:
@@ -49,10 +49,10 @@ def login_post():
|
||||
return fail_api(msg="验证码错误")
|
||||
user = User.query.filter_by(username=username).first()
|
||||
|
||||
if user is None:
|
||||
if not user:
|
||||
return fail_api(msg="不存在的用户")
|
||||
|
||||
if user.enable is 0:
|
||||
if user.enable == 0:
|
||||
return fail_api(msg="用户被暂停使用")
|
||||
|
||||
if username == user.username and user.validate_password(password):
|
||||
|
||||
Reference in New Issue
Block a user