From 94819cdc2a01e906ea1c5aac2726aeca489b0629 Mon Sep 17 00:00:00 2001 From: jelanmathewjames Date: Thu, 20 Jun 2024 21:51:26 +0530 Subject: [PATCH] refactor: Total Launchpad data api --- api/launchpad/launchpad_views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/launchpad/launchpad_views.py b/api/launchpad/launchpad_views.py index bea43a11..8a9527ca 100644 --- a/api/launchpad/launchpad_views.py +++ b/api/launchpad/launchpad_views.py @@ -146,9 +146,9 @@ def get(self, request): role__title__in=allowed_levels).select_related('role') ) ).filter( - user_organization_link_user__id__in=UserOrganizationLink.objects.filter( + Q(user_organization_link_user__id__in=UserOrganizationLink.objects.filter( org__org_type__in=allowed_org_types - ).values("id") + ).values("id")) | Q(user_organization_link_user__id__isnull=True) ).annotate( org=F("user_organization_link_user__org__title"), district_name=F("user_organization_link_user__org__district__name"),