Fix: Prefetches the custom field instance and the custom field all at once (#12617)

This commit is contained in:
Trenton H
2026-04-21 10:24:51 -07:00
committed by GitHub
parent ffaa2bb77a
commit 6017b11c42

View File

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