Fix for root groups to actually show only the groups with no parents.

This commit is contained in:
Chris Church 2013-06-04 11:17:23 -04:00
parent a29e60b533
commit ec986f4ebe

View File

@ -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):