From 22ebdc7feae0b2311a4b25b8e539b103e213df7e Mon Sep 17 00:00:00 2001 From: Adnan Kattekaden Date: Tue, 17 Oct 2023 21:38:59 +0530 Subject: [PATCH] kkem minor fix --- api/common/common_views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/common/common_views.py b/api/common/common_views.py index 4f942767..5e0c8d72 100644 --- a/api/common/common_views.py +++ b/api/common/common_views.py @@ -28,7 +28,8 @@ def get(self, request): learning_circle_count = LearningCircle.objects.all().count() total_no_enrollment = UserCircleLink.objects.filter(accepted=True).count() circle_count_by_ig = LearningCircle.objects.all().values(ig_name=F('ig__name')).annotate( - total_circles=Count('id'), total_users=Count('user', distinct=True)) + total_circles=Count('id')) + unique_user_count = UserCircleLink.objects.filter(accepted=True).values('user').distinct().count() return CustomResponse(response={'lc_count': learning_circle_count, 'total_enrollment': total_no_enrollment, 'circle_count_by_ig': circle_count_by_ig,