From b14515b28792253df17efbe398131ce7003ee02b Mon Sep 17 00:00:00 2001 From: Ryan Petrello Date: Wed, 19 Aug 2020 13:18:44 -0400 Subject: [PATCH] fix a bug that prevents the explicit removal of instances from groups --- awx/main/management/commands/remove_from_queue.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/awx/main/management/commands/remove_from_queue.py b/awx/main/management/commands/remove_from_queue.py index df7530992c..b249749219 100644 --- a/awx/main/management/commands/remove_from_queue.py +++ b/awx/main/management/commands/remove_from_queue.py @@ -32,4 +32,7 @@ class Command(BaseCommand): sys.exit(1) i = i.first() ig.instances.remove(i) + if i.hostname in ig.policy_instance_list: + ig.policy_instance_list.remove(i.hostname) + ig.save() print("Instance removed from instance group")