Merge pull request #1982 from bookwyrm-social/deleted-user-reviews

Remove reviews from deleted users
This commit is contained in:
Mouse Reeve 2022-02-28 11:20:44 -08:00 committed by GitHub
commit b7111589c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -227,7 +227,7 @@ class Status(OrderedCollectionPageMixin, BookWyrmModel):
@classmethod
def privacy_filter(cls, viewer, privacy_levels=None):
queryset = super().privacy_filter(viewer, privacy_levels=privacy_levels)
return queryset.filter(deleted=False)
return queryset.filter(deleted=False, user__is_active=True)
@classmethod
def direct_filter(cls, queryset, viewer):