From 764420c56054dbc252c1bd741150ce4657b74c5f Mon Sep 17 00:00:00 2001 From: Luke Sneeringer Date: Wed, 13 Aug 2014 13:41:22 -0400 Subject: [PATCH] Make mark_inactive_recursive plow over the name. --- awx/main/models/inventory.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/awx/main/models/inventory.py b/awx/main/models/inventory.py index e3ab8f6c35..27f40c6f88 100644 --- a/awx/main/models/inventory.py +++ b/awx/main/models/inventory.py @@ -589,7 +589,10 @@ class Group(CommonModelNameNotUnique): for direct_child in group_children[group]: linked_children.append((group, direct_child)) marked_groups.append(group) - Group.objects.filter(id__in=marked_groups).update(active=False) + Group.objects.filter(id__in=marked_groups).update( + active=False, + name='deleted_' + ''.join([random.choice(LETTERS) for i in range(0,50)]), + ) Host.objects.filter(id__in=marked_hosts).update(active=False) Group.parents.through.objects.filter(to_group__id__in=marked_groups) Group.hosts.through.objects.filter(group__id__in=marked_groups)