diff --git a/app/models.py b/app/models.py index 9471d85..8904680 100644 --- a/app/models.py +++ b/app/models.py @@ -134,7 +134,7 @@ class User(db.Model): user_info = User.query.filter(User.username == self.username).first() if user_info: - if self.check_password(user_info.password): + if user_info.password and self.check_password(user_info.password): logging.info('User "%s" logged in successfully' % self.username) return True else: