From 293fd73fe69b3f1ef73b85baf8a9a9b6c95c3127 Mon Sep 17 00:00:00 2001 From: Akita Noek Date: Wed, 16 Mar 2016 16:43:31 -0400 Subject: [PATCH] Missing .distinct() --- 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 efa66ef828..c628fd89f2 100644 --- a/awx/api/views.py +++ b/awx/api/views.py @@ -1437,7 +1437,7 @@ class GroupAllHostsList(SubListAPIView): 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 sublist_qs = parent.all_hosts.distinct() return qs & sublist_qs