update applications/view/passport/__init__.py.

This commit is contained in:
不胜舟
2022-04-12 11:16:54 +00:00
committed by Gitee
parent c50d5e7921
commit 7ae59415e8
+2 -2
View File
@@ -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):