mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	Fix: improve performance of listing result IDs (#5195)
This commit is contained in:
		| @@ -56,11 +56,7 @@ class StandardPagination(PageNumberPagination): | |||||||
|                     except Exception: |                     except Exception: | ||||||
|                         pass |                         pass | ||||||
|         else: |         else: | ||||||
|             for obj in self.page.paginator.object_list: |             ids = self.page.paginator.object_list.values_list("pk", flat=True) | ||||||
|                 if hasattr(obj, "id"): |  | ||||||
|                     ids.append(obj.id) |  | ||||||
|                 elif hasattr(obj, "fields"): |  | ||||||
|                     ids.append(obj.fields()["id"]) |  | ||||||
|         return ids |         return ids | ||||||
|  |  | ||||||
|     def get_paginated_response_schema(self, schema): |     def get_paginated_response_schema(self, schema): | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Antoine Libert
					Antoine Libert