aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--famille.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/famille.py b/famille.py
index 4bc11f7..f910a33 100644
--- a/famille.py
+++ b/famille.py
@@ -269,8 +269,10 @@ def edit_user():
pass
result['notify'] = "notify" in request.form
- result.update({k: v for k, v in request.form.items() if k not in
- ['password', 'password_confirm', 'notify']})
+ for k in ["birthday", "nameday", "email", "phone", "adress_line1",
+ "adress_line2", "adress_city_line", "timezone"]:
+ if k in result.form:
+ result[k] = result.form[k]
set_string = ",".join([f"{k}=?" for k in result.keys()])
sqlstr = f"UPDATE users SET {set_string} WHERE id=?"
db = get_db()