mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-02 13:45:10 -05:00
Fix: dont include documents in trash in counts (#7111)
This commit is contained in:
parent
f3cf608caa
commit
80c2d90e74
@ -231,10 +231,11 @@ class PermissionsAwareDocumentCountMixin(PassUserMixin):
|
||||
|
||||
def get_queryset(self):
|
||||
filter = (
|
||||
None
|
||||
Q(documents__deleted_at__isnull=True)
|
||||
if self.request.user is None or self.request.user.is_superuser
|
||||
else (
|
||||
Q(
|
||||
documents__deleted_at__isnull=True,
|
||||
documents__id__in=get_objects_for_user_owner_aware(
|
||||
self.request.user,
|
||||
"documents.view_document",
|
||||
|
Loading…
x
Reference in New Issue
Block a user