]> git.lizzy.rs Git - cheatdb.git/blobdiff - app/models.py
Fix email sign up
[cheatdb.git] / app / models.py
index eff06b6af0ed51c745647bd062245b8324dd43ca..7a24afb71535b11e119cf08adab4bb3fc257c9e1 100644 (file)
@@ -214,6 +214,9 @@ class User(db.Model, UserMixin):
                        .filter(Thread.created_at > hour_ago).count() < 2
 
        def __eq__(self, other):
+               if other is None:
+                       return False
+
                if not self.is_authenticated or not other.is_authenticated:
                        return False