From ea9642f5df1662b1f492b9a3b6a8d36649705637 Mon Sep 17 00:00:00 2001 From: Akita Noek Date: Tue, 15 Mar 2016 13:06:24 -0400 Subject: [PATCH] Fixed missing .distinct() necessary for '&' --- awx/api/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/api/views.py b/awx/api/views.py index 96c3bf396e..1a1ce35346 100644 --- a/awx/api/views.py +++ b/awx/api/views.py @@ -1555,7 +1555,7 @@ class InventoryRootGroupsList(SubListCreateAttachDetachAPIView): def get_queryset(self): parent = self.get_parent_object() self.check_parent_access(parent) - qs = self.request.user.get_queryset(self.model) + qs = self.request.user.get_queryset(self.model).distinct() # need distinct for '&' operator return qs & parent.root_groups class BaseVariableData(RetrieveUpdateAPIView):