Fixed #18666 -- when upgrading a user's password to a new algorithm only save the password field to the databaes.

This commit is contained in:
Alex Gaynor 2012-07-24 19:03:26 -07:00
parent 50837434db
commit ace9ccfe9f
1 changed files with 1 additions and 1 deletions

View File

@ -299,7 +299,7 @@ class User(models.Model):
""" """
def setter(raw_password): def setter(raw_password):
self.set_password(raw_password) self.set_password(raw_password)
self.save() self.save(update_fields=["password"])
return check_password(raw_password, self.password, setter) return check_password(raw_password, self.password, setter)
def set_unusable_password(self): def set_unusable_password(self):