Style cleanup

This commit is contained in:
Mouse Reeve 2021-10-06 11:23:36 -07:00
parent 53e5762563
commit 8d00ef4318

View file

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