Skip to content

Commit

Permalink
fix: inline form validation in the profile edition page
Browse files Browse the repository at this point in the history
  • Loading branch information
azmeuk committed Sep 11, 2023
1 parent 17f84e4 commit 7e3cb6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion canaille/core/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 7e3cb6b

Please sign in to comment.