Fix crash on review voting on homepage

This commit is contained in:
rubenwardy 2023-12-04 10:22:56 +00:00
parent a1a03d6de4
commit 36c63b4657

@ -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