Prefetches the custom field instance and the custom field all at once

This commit is contained in:
Trenton H
2026-04-21 07:54:38 -07:00
parent ffaa2bb77a
commit 85a3b0cd6b

View File

@@ -968,7 +968,10 @@ class DocumentViewSet(
),
),
"tags",
"custom_fields",
Prefetch(
"custom_fields",
queryset=CustomFieldInstance.objects.select_related("field"),
),
"notes",
)
)