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):
|
def get_queryset(self):
|
||||||
filter = (
|
filter = (
|
||||||
None
|
Q(documents__deleted_at__isnull=True)
|
||||||
if self.request.user is None or self.request.user.is_superuser
|
if self.request.user is None or self.request.user.is_superuser
|
||||||
else (
|
else (
|
||||||
Q(
|
Q(
|
||||||
|
documents__deleted_at__isnull=True,
|
||||||
documents__id__in=get_objects_for_user_owner_aware(
|
documents__id__in=get_objects_for_user_owner_aware(
|
||||||
self.request.user,
|
self.request.user,
|
||||||
"documents.view_document",
|
"documents.view_document",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user