mirror of
https://github.com/ansible/awx.git
synced 2026-05-08 01:47:35 -02:30
Correctly manage current apps for the action_node addition
This commit is contained in:
@@ -5,9 +5,11 @@ from __future__ import unicode_literals
|
|||||||
from django.db import migrations, models
|
from django.db import migrations, models
|
||||||
|
|
||||||
from awx.main.models import CredentialType
|
from awx.main.models import CredentialType
|
||||||
|
from awx.main.utils.common import set_current_apps
|
||||||
|
|
||||||
|
|
||||||
def migrate_to_static_inputs(apps, schema_editor):
|
def migrate_to_static_inputs(apps, schema_editor):
|
||||||
|
set_current_apps(apps)
|
||||||
CredentialType.setup_tower_managed_defaults()
|
CredentialType.setup_tower_managed_defaults()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -9,9 +9,11 @@ import taggit.managers
|
|||||||
# AWX
|
# AWX
|
||||||
import awx.main.fields
|
import awx.main.fields
|
||||||
from awx.main.models import CredentialType
|
from awx.main.models import CredentialType
|
||||||
|
from awx.main.utils.common import set_current_apps
|
||||||
|
|
||||||
|
|
||||||
def setup_tower_managed_defaults(apps, schema_editor):
|
def setup_tower_managed_defaults(apps, schema_editor):
|
||||||
|
set_current_apps(apps)
|
||||||
CredentialType.setup_tower_managed_defaults()
|
CredentialType.setup_tower_managed_defaults()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ from __future__ import unicode_literals
|
|||||||
|
|
||||||
from django.db import migrations, models
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
from awx.main.utils.common import set_current_apps
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
@@ -12,6 +14,7 @@ class Migration(migrations.Migration):
|
|||||||
]
|
]
|
||||||
|
|
||||||
operations = [
|
operations = [
|
||||||
|
migrations.RunPython(migrations.RunPython.noop, lambda apps, schema_editor: set_current_apps(apps)),
|
||||||
migrations.RemoveField(
|
migrations.RemoveField(
|
||||||
model_name='joborigin',
|
model_name='joborigin',
|
||||||
name='instance',
|
name='instance',
|
||||||
@@ -28,4 +31,5 @@ class Migration(migrations.Migration):
|
|||||||
migrations.DeleteModel(
|
migrations.DeleteModel(
|
||||||
name='JobOrigin',
|
name='JobOrigin',
|
||||||
),
|
),
|
||||||
|
migrations.RunPython(lambda apps, schema_editor: set_current_apps(apps), migrations.RunPython.noop)
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user