From 1072381b7d61aba4aeb9ef24ac97f737886094cc Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Fri, 15 Oct 2021 11:09:46 -0700 Subject: [PATCH] Fixes followers filter for non-status objs --- bookwyrm/models/base_model.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bookwyrm/models/base_model.py b/bookwyrm/models/base_model.py index 976551188..46a0d7232 100644 --- a/bookwyrm/models/base_model.py +++ b/bookwyrm/models/base_model.py @@ -69,7 +69,10 @@ class BookWyrmModel(models.Model): # you can see the followers only posts of people you follow if self.privacy == "followers" and ( self.user.followers.filter(id=viewer.id).first() - or self.mention_users.filter(id=viewer.id) + or ( + hasattr(self, "mention_users") + and self.mention_users.filter(id=viewer.id) + ) ): return