Don't include immediate children in the list for delete consideration when recursively deleting groups and their children

This commit is contained in:
Matthew Jones
2014-05-15 13:19:44 -04:00
parent 6d0da4672d
commit 70e42aff36

View File

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