From 7e3cb6ba53aa933bd000c64c49b1b9dcec50701c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89loi=20Rivard?= Date: Mon, 11 Sep 2023 18:28:47 +0200 Subject: [PATCH] fix: inline form validation in the profile edition page --- canaille/core/account.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/canaille/core/account.py b/canaille/core/account.py index 7681607f..afd7a5a5 100644 --- a/canaille/core/account.py +++ b/canaille/core/account.py @@ -605,7 +605,7 @@ def profile_edition(user, edited_user): if not request.form or profile_form.form_control(): return render_template("profile_edit.html", **render_context) - if request.form.get("action") == "edit-profile": + if request_is_htmx() or request.form.get("action") == "edit-profile": if not profile_form.validate(): flash(_("Profile edition failed."), "error") return render_template("profile_edit.html", **render_context)