From 36c63b46577a2198a2bc389b846b57d810793fe4 Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Mon, 4 Dec 2023 10:22:56 +0000 Subject: [PATCH] Fix crash on review voting on homepage --- app/models/users.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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