mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-10-20 06:48:16 +00:00
Fix: prevent doc permissions queries on schema view (#14503)
This commit is contained in:
1 parent
8bbca8a269
commit
d4826f50c9
1 file changed
+5
@@ -498,6 +498,11 @@ class BulkPermissionMixin:
|
||||
"""
|
||||
context = super().get_serializer_context()
|
||||
|
||||
if getattr(self, "swagger_fake_view", False):
|
||||
# Schema generation only needs the serializer shape; without a
|
||||
# paginated page we'd otherwise scan the entire queryset below.
|
||||
return context
|
||||
|
||||
if getattr(self, "action", None) != "list":
|
||||
# Batching only pays off across a page of objects; for single-object
|
||||
# actions (retrieve, update, ...) the per-object fallback in
|
||||
|
||||
Reference in new issue
Block a user