diff --git a/app/models/users.py b/app/models/users.py index 5591d2bd..c4925a16 100644 --- a/app/models/users.py +++ b/app/models/users.py @@ -318,7 +318,8 @@ class User(db.Model, UserMixin): if other is None: return False - if not self.is_authenticated or not other.is_authenticated: + # Anonymous users + if not hasattr(self, "id") or not hasattr(other, "id"): return False assert self.id > 0