Skip to content

A community-supported supercharged document management system: scan, index and archive all your documents

Fix: API statistics document_file_type_counts return type (#4464)

shamoon10929e9ac8a9
diff --git a/src/documents/views.py b/src/documents/views.py
index 8f2be0549..49682e3ea 100644
--- a/src/documents/views.py
+++ b/src/documents/views.py
@@ -1001,7 +1001,7 @@ class StatisticsView(APIView):
.annotate(mime_type_count=Count("mime_type"))
.order_by("-mime_type_count")
if documents_total > 0
- else 0
+ else []
)
character_count = (