Use NULL for non-existant passwords

This commit is contained in:
rubenwardy
2020-12-04 22:35:22 +00:00
parent a8537659e2
commit bfcdd642fd
4 changed files with 41 additions and 7 deletions

View File

@@ -143,7 +143,7 @@ def change_password():
@bp.route("/user/set-password/", methods=["GET", "POST"])
@login_required
def set_password():
if current_user.hasPassword():
if current_user.password:
return redirect(url_for("users.change_password"))
form = SetPasswordForm(request.form)