fix: [create user] fix template error if an invalid password is provided

This commit is contained in:
terrtia 2025-01-31 09:04:53 +01:00
parent ee5a6197f4
commit 8a9a4cb290
No known key found for this signature in database
GPG key ID: 1E1B1F50D84613D0

View file

@ -299,9 +299,9 @@ def create_user_post():
if ail_users.check_password_strength(password1): if ail_users.check_password_strength(password1):
password = password1 password = password1
else: else:
return render_template("create_user.html", all_roles=all_roles, error="Incorrect Password", acl_admin=True) return render_template("create_user.html", all_roles=all_roles, error="Incorrect Password", acl_admin=True, meta={})
else: else:
return render_template("create_user.html", all_roles=all_roles, error="Passwords don't match", acl_admin=True) return render_template("create_user.html", all_roles=all_roles, error="Passwords don't match", acl_admin=True, meta={})
# generate password # generate password
else: else:
password = ail_users.gen_password() password = ail_users.gen_password()