aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2020-04-11 17:56:35 +0100
committerrubenwardy <rw@rubenwardy.com>2020-04-11 17:56:35 +0100
commit9cc3eba0099c46cb0818e5beb06f855441814b0c (patch)
tree01ee27dd532814c6190e7cc82cf3972ea023ac57
parent54a636d79e6589c0875c5ba897a5217d36fa6f3a (diff)
downloadcheatdb-9cc3eba0099c46cb0818e5beb06f855441814b0c.tar.xz
Fix email sign upv1.24.1
-rw-r--r--app/models.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/models.py b/app/models.py
index eff06b6..7a24afb 100644
--- a/app/models.py
+++ b/app/models.py
@@ -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