]> git.lizzy.rs Git - cheatdb.git/commitdiff
Fix email sign up v1.24.1
authorrubenwardy <rw@rubenwardy.com>
Sat, 11 Apr 2020 16:56:35 +0000 (17:56 +0100)
committerrubenwardy <rw@rubenwardy.com>
Sat, 11 Apr 2020 16:56:35 +0000 (17:56 +0100)
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