mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
bugfix: populate context on invalid password (account edit)
Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
a26e703343
commit
28300ee889
1 changed files with 4 additions and 4 deletions
|
@ -483,15 +483,15 @@ async def account_edit_post(request: Request,
|
|||
context = await make_variable_context(request, "Accounts")
|
||||
context["user"] = user
|
||||
|
||||
args = dict(await request.form())
|
||||
context = make_account_form_context(context, request, user, args)
|
||||
ok, errors = process_account_form(request, user, args)
|
||||
|
||||
if not passwd:
|
||||
context["errors"] = ["Invalid password."]
|
||||
return render_template(request, "account/edit.html", context,
|
||||
status_code=int(HTTPStatus.BAD_REQUEST))
|
||||
|
||||
args = dict(await request.form())
|
||||
context = make_account_form_context(context, request, user, args)
|
||||
ok, errors = process_account_form(request, user, args)
|
||||
|
||||
if not ok:
|
||||
context["errors"] = errors
|
||||
return render_template(request, "account/edit.html", context,
|
||||
|
|
Loading…
Add table
Reference in a new issue