mirror of
https://github.com/ansible/awx.git
synced 2026-02-20 12:40:06 -03:30
Fix for root groups to actually show only the groups with no parents.
This commit is contained in:
@@ -887,8 +887,7 @@ class InventoryRootGroupsList(BaseSubList):
|
|||||||
inventory = Inventory.objects.get(pk=self.kwargs['pk'])
|
inventory = Inventory.objects.get(pk=self.kwargs['pk'])
|
||||||
base = inventory.groups
|
base = inventory.groups
|
||||||
all_ids = base.values_list('id', flat=True)
|
all_ids = base.values_list('id', flat=True)
|
||||||
base.exclude(parents__id__in = all_ids)
|
return base.exclude(parents__pk__in = all_ids)
|
||||||
return base
|
|
||||||
|
|
||||||
class GroupsVariableDetail(VariableBaseDetail):
|
class GroupsVariableDetail(VariableBaseDetail):
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user