mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 19:10:07 -03:30
Fix potential children to show only groups from the same inventory.
This commit is contained in:
parent
432e379878
commit
70d8ab9af6
@ -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))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user