From 4261fa54c4dfc68bd5492d62eafc06ed11593c3b Mon Sep 17 00:00:00 2001 From: Ayush Chauhan <77507609+ayushchauhan12@users.noreply.github.com> Date: Sun, 22 Sep 2024 16:52:30 +0530 Subject: [PATCH] fix:Hide asset users from users list page (#2107) (#2113) Co-authored-by: Vignesh Hari <14056798+vigneshhari@users.noreply.github.com> --- care/users/api/viewsets/users.py | 1 + 1 file changed, 1 insertion(+) diff --git a/care/users/api/viewsets/users.py b/care/users/api/viewsets/users.py index f67ce6ac42..6a908ae940 100644 --- a/care/users/api/viewsets/users.py +++ b/care/users/api/viewsets/users.py @@ -107,6 +107,7 @@ class UserViewSet( created_by_user=F("created_by__username"), ) ) + queryset = queryset.filter(Q(asset__isnull=True)) lookup_field = "username" lookup_value_regex = "[^/]+" permission_classes = (