From f593bb164736e678158b7ac0bd89ef6e4f5a5d08 Mon Sep 17 00:00:00 2001 From: jelanmathewjames <72068016+jelanmathewjames@users.noreply.github.com> Date: Sat, 22 Jun 2024 14:37:40 +0530 Subject: [PATCH] Update launchpad_views.py --- api/launchpad/launchpad_views.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api/launchpad/launchpad_views.py b/api/launchpad/launchpad_views.py index d36740a2..d757732b 100644 --- a/api/launchpad/launchpad_views.py +++ b/api/launchpad/launchpad_views.py @@ -102,6 +102,8 @@ def get(self, request): state=F("user_organization_link_user__org__district__zone__state__name"), level=F("user_role_link_user__role__title"), time_=Max("karma_activity_log_user__created_at") + ).filter( + Q(level__in=allowed_levels) | Q(level__isnull=True) ).distinct() paginated_queryset = CommonUtils.get_paginated_queryset( @@ -429,4 +431,4 @@ def post(self, request): errors[data.get('email')]["not_found_colleges"] = not_found_colleges if error: return CustomResponse(message=errors).get_failure_response() - return CustomResponse(general_message="Successfully added users").get_success_response() \ No newline at end of file + return CustomResponse(general_message="Successfully added users").get_success_response()