Fix crash caused by unsert user ID in session

This commit is contained in:
Kiril Kovachev 2024-10-18 16:29:16 +01:00
parent 242fcfb823
commit 826d240489

View File

@ -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"],)