mirror of
https://github.com/ansible/awx.git
synced 2026-01-19 21:51:26 -03:30
Merge pull request #4053 from AlanCoding/apps_management
Correctly manage current apps for the action_node addition Reviewed-by: https://github.com/softwarefactory-project-zuul[bot]
This commit is contained in:
commit
7161f28d26
@ -5,9 +5,11 @@ from __future__ import unicode_literals
|
||||
from django.db import migrations, models
|
||||
|
||||
from awx.main.models import CredentialType
|
||||
from awx.main.utils.common import set_current_apps
|
||||
|
||||
|
||||
def migrate_to_static_inputs(apps, schema_editor):
|
||||
set_current_apps(apps)
|
||||
CredentialType.setup_tower_managed_defaults()
|
||||
|
||||
|
||||
|
||||
@ -9,9 +9,11 @@ import taggit.managers
|
||||
# AWX
|
||||
import awx.main.fields
|
||||
from awx.main.models import CredentialType
|
||||
from awx.main.utils.common import set_current_apps
|
||||
|
||||
|
||||
def setup_tower_managed_defaults(apps, schema_editor):
|
||||
set_current_apps(apps)
|
||||
CredentialType.setup_tower_managed_defaults()
|
||||
|
||||
|
||||
|
||||
@ -4,6 +4,8 @@ from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
from awx.main.utils.common import set_current_apps
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
@ -12,6 +14,7 @@ class Migration(migrations.Migration):
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RunPython(migrations.RunPython.noop, lambda apps, schema_editor: set_current_apps(apps)),
|
||||
migrations.RemoveField(
|
||||
model_name='joborigin',
|
||||
name='instance',
|
||||
@ -28,4 +31,5 @@ class Migration(migrations.Migration):
|
||||
migrations.DeleteModel(
|
||||
name='JobOrigin',
|
||||
),
|
||||
migrations.RunPython(lambda apps, schema_editor: set_current_apps(apps), migrations.RunPython.noop)
|
||||
]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user