mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-08 07:45:32 +01:00
Fix: improve performance of listing result IDs (#5195)
This commit is contained in:
parent
670a3f6c7f
commit
54372b5618
1 changed files with 1 additions and 5 deletions
|
|
@ -56,11 +56,7 @@ class StandardPagination(PageNumberPagination):
|
|||
except Exception:
|
||||
pass
|
||||
else:
|
||||
for obj in self.page.paginator.object_list:
|
||||
if hasattr(obj, "id"):
|
||||
ids.append(obj.id)
|
||||
elif hasattr(obj, "fields"):
|
||||
ids.append(obj.fields()["id"])
|
||||
ids = self.page.paginator.object_list.values_list("pk", flat=True)
|
||||
return ids
|
||||
|
||||
def get_paginated_response_schema(self, schema):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue