def check_password(self, password): """Get password from hash""" return bcrypt.check_password_hash(self.password, password.encode("utf-8"))
def check_password(self, password): if self.password is None: return False return bcrypt.check_password_hash(self.password, password)