dev: group by counts

This commit is contained in:
pablohashescobar 2024-03-22 14:14:07 +05:30
parent b8aea19715
commit b7dcbe91dd

View File

@ -457,7 +457,9 @@ class SubGroupedOffsetPaginator(OffsetPaginator):
) )
def __get_subgroup_total_queryset(self): 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( count=Count(
"id", "id",
filter=self.count_filter, filter=self.count_filter,