From 265e6d5f6508f309b8aef84e64fca0202081b6a2 Mon Sep 17 00:00:00 2001 From: kitoy Date: Sun, 7 Aug 2022 18:32:07 +0200 Subject: [PATCH] =?UTF-8?q?=09supprim=C3=A9=C2=A0:=20=20=20=20=20=20=20=20?= =?UTF-8?q?sqlite=20=09modifi=C3=A9=C2=A0:=20=20=20=20=20=20=20=20=20views?= =?UTF-8?q?/loginlogout.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sqlite | 0 views/loginlogout.py | 6 +++++- 2 files changed, 5 insertions(+), 1 deletion(-) delete mode 100644 sqlite diff --git a/sqlite b/sqlite deleted file mode 100644 index e69de29..0000000 diff --git a/views/loginlogout.py b/views/loginlogout.py index 45c52eb..11fd331 100644 --- a/views/loginlogout.py +++ b/views/loginlogout.py @@ -63,7 +63,11 @@ def index(): cursor.execute("""SELECT token passwd FROM users where name=? """, ("pywallter", )) tmp = cursor.fetchone() conn.close - token = tmp[0] + if tmp: + token = tmp[0] + else: + token = None + if 'username' in session : return redirect(url_for('profil.profile')) else :