From 826d24048995992fc45f9f4f0e35c0e0516c50bb Mon Sep 17 00:00:00 2001 From: Kiril Kovachev Date: Fri, 18 Oct 2024 16:29:16 +0100 Subject: [PATCH] Fix crash caused by unsert user ID in session --- kanken_online/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kanken_online/__init__.py b/kanken_online/__init__.py index 0ee952b..480d9eb 100644 --- a/kanken_online/__init__.py +++ b/kanken_online/__init__.py @@ -41,7 +41,7 @@ def create_app(test_config=None): def update_settings(form): db = get_database() - if session["user_id"]: + if "user_id" in session: # Set values in the database settings = db.execute("SELECT * FROM user_settings WHERE user_id = ?", (session["user_id"],)