fix a bug that prevents the explicit removal of instances from groups

This commit is contained in:
Ryan Petrello 2020-08-19 13:18:44 -04:00
parent 383f8aa8f9
commit b14515b287
No known key found for this signature in database
GPG Key ID: F2AA5F2122351777

View File

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