From 15fd22681d25e144e8ec4a1da47e3de6a9d08d4b Mon Sep 17 00:00:00 2001 From: Jeff Bradberry Date: Fri, 8 Oct 2021 11:53:21 -0400 Subject: [PATCH] Revert removing the old isolated groups In 4.1+ / AAP 2.1+, isolated groups should be converted into plain instance groups, and it's desirable for the old ones to stick around since they'll likely be tied to a bunch of job templates. We do not want to make the users have to reconstruct those relationships. --- awx/main/migrations/0139_isolated_removal.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/awx/main/migrations/0139_isolated_removal.py b/awx/main/migrations/0139_isolated_removal.py index 0db16b6348..793b8a10d6 100644 --- a/awx/main/migrations/0139_isolated_removal.py +++ b/awx/main/migrations/0139_isolated_removal.py @@ -9,12 +9,6 @@ def remove_iso_instances(apps, schema_editor): Instance.objects.filter(rampart_groups__controller__isnull=False).delete() -def remove_iso_groups(apps, schema_editor): - InstanceGroup = apps.get_model('main', 'InstanceGroup') - with transaction.atomic(): - InstanceGroup.objects.filter(controller__isnull=False).delete() - - class Migration(migrations.Migration): atomic = False @@ -24,7 +18,6 @@ class Migration(migrations.Migration): operations = [ migrations.RunPython(remove_iso_instances), - migrations.RunPython(remove_iso_groups), migrations.RemoveField( model_name='instance', name='last_isolated_check',