Use update_fields for password_change

This commit is contained in:
Mouse Reeve 2021-08-03 12:33:48 -07:00
parent ee9c5a2a4b
commit 1f2fea4a8e

View file

@ -76,7 +76,7 @@ class PasswordReset(View):
return TemplateResponse(request, "password_reset.html", data)
user.set_password(new_password)
user.save(broadcast=False)
user.save(broadcast=False, update_fields=["password"])
login(request, user)
reset_code.delete()
return redirect("/")
@ -100,6 +100,6 @@ class ChangePassword(View):
return redirect("preferences/password")
request.user.set_password(new_password)
request.user.save(broadcast=False)
request.user.save(broadcast=False, update_fields=["password"])
login(request, request.user)
return redirect(request.user.local_path)