From b7dcbe91dd331bfc5d23f9ae5a81a00424579259 Mon Sep 17 00:00:00 2001 From: pablohashescobar Date: Fri, 22 Mar 2024 14:14:07 +0530 Subject: [PATCH] dev: group by counts --- apiserver/plane/utils/paginator.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apiserver/plane/utils/paginator.py b/apiserver/plane/utils/paginator.py index 726455771..f1b23d49f 100644 --- a/apiserver/plane/utils/paginator.py +++ b/apiserver/plane/utils/paginator.py @@ -457,7 +457,9 @@ class SubGroupedOffsetPaginator(OffsetPaginator): ) def __get_subgroup_total_queryset(self): - return self.queryset.values(self.sub_group_by_field_name).annotate( + return self.queryset.values( + self.group_by_field_name, self.sub_group_by_field_name + ).annotate( count=Count( "id", filter=self.count_filter,