mirror of
https://github.com/ansible/awx.git
synced 2026-02-28 00:08:44 -03:30
Remove the managed flag from all existing EEs
This flag henceforth is going to be used only for the "control plane" execution environments, which sysadmins will not be allowed to alter.
This commit is contained in:
21
awx/main/migrations/0145_deregister_managed_ee_objs.py
Normal file
21
awx/main/migrations/0145_deregister_managed_ee_objs.py
Normal file
@@ -0,0 +1,21 @@
|
||||
# Generated by Django 2.2.16 on 2021-06-07 19:36
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
def forwards(apps, schema_editor):
|
||||
ExecutionEnvironment = apps.get_model('main', 'ExecutionEnvironment')
|
||||
for row in ExecutionEnvironment.objects.filter(managed_by_tower=True):
|
||||
row.managed_by_tower = False
|
||||
row.save(update_fields=['managed_by_tower'])
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('main', '0144_event_partitions'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RunPython(forwards),
|
||||
]
|
||||
Reference in New Issue
Block a user