From 70e42aff3642a87ad9d23f70d48723c636d42502 Mon Sep 17 00:00:00 2001 From: Matthew Jones Date: Thu, 15 May 2014 13:19:44 -0400 Subject: [PATCH] Don't include immediate children in the list for delete consideration when recursively deleting groups and their children --- awx/main/models/inventory.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/main/models/inventory.py b/awx/main/models/inventory.py index c71d7f90b4..90f67b2d8c 100644 --- a/awx/main/models/inventory.py +++ b/awx/main/models/inventory.py @@ -394,7 +394,7 @@ class Group(CommonModelNameNotUnique): def mark_inactive_recursive(self, parent=None): from awx.main.tasks import update_inventory_computed_fields def mark_actual(parent=parent): - linked_children = [(parent, self)] + [(self, child) for child in self.children.all()] + linked_children = [(parent, self)] marked_groups = [] marked_hosts = [] for subgroup in linked_children: