Check if plain_text_password is falsish instead of empty string

This commit is contained in:
Nick Douma 2020-03-06 13:50:04 +01:00
parent ab6480a4b4
commit 7ef6f5db4e

View File

@ -473,7 +473,7 @@ class User(db.Model):
user.email = self.email
# store new password hash (only if changed)
if self.plain_text_password != "":
if self.plain_text_password:
user.password = self.get_hashed_password(
self.plain_text_password).decode("utf-8")