From 9cc3eba0099c46cb0818e5beb06f855441814b0c Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Sat, 11 Apr 2020 17:56:35 +0100 Subject: [PATCH] Fix email sign up --- app/models.py | 3 +++ 1 file changed, 3 insertions(+) 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