From 70d8ab9af6e96d75c0232bb93b9d13568c7cdbc8 Mon Sep 17 00:00:00 2001 From: Chris Church Date: Mon, 28 Oct 2013 12:44:29 -0400 Subject: [PATCH] Fix potential children to show only groups from the same inventory. --- awx/main/views.py | 1 + 1 file changed, 1 insertion(+) diff --git a/awx/main/views.py b/awx/main/views.py index 6f903bcfc7..b7a8541dec 100644 --- a/awx/main/views.py +++ b/awx/main/views.py @@ -552,6 +552,7 @@ class GroupPotentialChildrenList(SubListAPIView): parent = self.get_parent_object() self.check_parent_access(parent) qs = self.request.user.get_queryset(self.model) + qs = qs.filter(inventory__pk=parent.inventory.pk) except_pks = set([parent.pk]) except_pks.update(parent.all_parents.values_list('pk', flat=True)) except_pks.update(parent.all_children.values_list('pk', flat=True))