Use a backend display_count to fix nested tag thing

This commit is contained in:
shamoon
2026-03-13 07:16:59 -07:00
parent 97602f79fb
commit 84e8caf25f
4 changed files with 17 additions and 6 deletions
+1
View File
@@ -555,6 +555,7 @@ class TagViewSet(PermissionsAwareDocumentCountMixin, ModelViewSet):
page = self.paginate_queryset(queryset)
serializer = self.get_serializer(page, many=True)
response = self.get_paginated_response(serializer.data)
response.data["display_count"] = len(children_source)
api_version = int(request.version or settings.REST_FRAMEWORK["DEFAULT_VERSION"])
if descendant_pks and api_version < 10:
# Include children in the "all" field, if needed