From a7aba156a468ed60a76a810142b2a8fa559f1e7e Mon Sep 17 00:00:00 2001 From: houxiaoyi Date: Wed, 23 Jun 2021 10:19:38 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AD=97=E7=AC=A6?= =?UTF-8?q?=E7=BC=96=E7=A0=81=E5=92=8C=E8=AF=AD=E6=B3=95=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- applications/views/admin/index.py | 2 +- main.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/applications/views/admin/index.py b/applications/views/admin/index.py index aff62b5..e688cc4 100644 --- a/applications/views/admin/index.py +++ b/applications/views/admin/index.py @@ -54,7 +54,7 @@ def login(): if user is None: 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): diff --git a/main.py b/main.py index 4602732..7cb9356 100644 --- a/main.py +++ b/main.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from flask import Flask from flask_uploads import configure_uploads from applications.config import database, common -- Gitee From 53af54a760015ff335da490a8c2b0071d26b6c96 Mon Sep 17 00:00:00 2001 From: aohanhongzhi Date: Wed, 23 Jun 2021 10:21:34 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AD=97=E7=AC=A6?= =?UTF-8?q?=E7=BC=96=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manage.py | 1 + 1 file changed, 1 insertion(+) diff --git a/manage.py b/manage.py index 3b7b5fd..cfbc4fb 100644 --- a/manage.py +++ b/manage.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from flask_migrate import Migrate, MigrateCommand from flask_script import Manager, Server -- Gitee