From ec986f4ebe9b2de52be5c53e684857425eb042aa Mon Sep 17 00:00:00 2001 From: Chris Church Date: Tue, 4 Jun 2013 11:17:23 -0400 Subject: [PATCH] Fix for root groups to actually show only the groups with no parents. --- ansibleworks/main/views.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ansibleworks/main/views.py b/ansibleworks/main/views.py index 4d414de5ca..d4fb41a499 100644 --- a/ansibleworks/main/views.py +++ b/ansibleworks/main/views.py @@ -887,8 +887,7 @@ class InventoryRootGroupsList(BaseSubList): inventory = Inventory.objects.get(pk=self.kwargs['pk']) base = inventory.groups all_ids = base.values_list('id', flat=True) - base.exclude(parents__id__in = all_ids) - return base + return base.exclude(parents__pk__in = all_ids) class GroupsVariableDetail(VariableBaseDetail):