mirror of
https://github.com/ansible/awx.git
synced 2026-01-12 02:19:58 -03:30
Merge pull request #5817 from chrismeyersfsu/fix-instance_migration
use existing version of Instance Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
commit
e54fd19bca
@ -3,15 +3,14 @@ from uuid import uuid4
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
from awx.main.models import Instance
|
||||
|
||||
|
||||
def _generate_new_uuid_for_iso_nodes(apps, schema_editor):
|
||||
Instance = apps.get_model('main', 'Instance')
|
||||
for instance in Instance.objects.all():
|
||||
if instance.is_isolated():
|
||||
instance.uuid = str(uuid4())
|
||||
instance.save()
|
||||
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user