Fix crash caused by unsert user ID in session
This commit is contained in:
parent
242fcfb823
commit
826d240489
@ -41,7 +41,7 @@ def create_app(test_config=None):
|
|||||||
def update_settings(form):
|
def update_settings(form):
|
||||||
db = get_database()
|
db = get_database()
|
||||||
|
|
||||||
if session["user_id"]:
|
if "user_id" in session:
|
||||||
# Set values in the database
|
# Set values in the database
|
||||||
settings = db.execute("SELECT * FROM user_settings WHERE user_id = ?",
|
settings = db.execute("SELECT * FROM user_settings WHERE user_id = ?",
|
||||||
(session["user_id"],)
|
(session["user_id"],)
|
||||||
|
Loading…
Reference in New Issue
Block a user