From 8d00ef4318a5f7500cf90cd0ae5bd30efa45fab4 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Wed, 6 Oct 2021 11:23:36 -0700 Subject: [PATCH] Style cleanup --- bookwyrm/models/base_model.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/bookwyrm/models/base_model.py b/bookwyrm/models/base_model.py index d32ec67b..b781a506 100644 --- a/bookwyrm/models/base_model.py +++ b/bookwyrm/models/base_model.py @@ -119,14 +119,13 @@ class BookWyrmModel(models.Model): privacy_levels = [ p for p in privacy_levels if not p in ["followers", "direct"] ] - - # exclude blocks from both directions - if not viewer.is_anonymous: + else: + # exclude blocks from both directions queryset = queryset.exclude( Q(user__blocked_by=viewer) | Q(user__blocks=viewer) ) - # filter to only privided privacy levels + # filter to only provided privacy levels queryset = queryset.filter(privacy__in=privacy_levels) if "followers" in privacy_levels: