Browse Source

Fix user password being blanked #164

sh4nks 9 years ago
parent
commit
f58f253b88
1 changed files with 2 additions and 0 deletions
  1. 2 0
      flaskbb/user/models.py

+ 2 - 0
flaskbb/user/models.py

@@ -189,6 +189,8 @@ class User(db.Model, UserMixin, CRUDMixin):
 
     def _set_password(self, password):
         """Generates a password hash for the provided password."""
+        if not password:
+            return
         self._password = generate_password_hash(password)
 
     # Hide password encryption by exposing password field only.