mirror of
https://github.com/ZwareBear/awx.git
synced 2026-05-06 16:32:01 -05:00
add migration file to setup managed credential types to add the new credential type
Signed-off-by: Hao Liu <haoli@redhat.com>
This commit is contained in:
@@ -3,6 +3,14 @@
|
|||||||
from django.db import migrations, models
|
from django.db import migrations, models
|
||||||
import django.db.models.deletion
|
import django.db.models.deletion
|
||||||
|
|
||||||
|
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(apps)
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
@@ -28,4 +36,5 @@ class Migration(migrations.Migration):
|
|||||||
to='main.credential',
|
to='main.credential',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
migrations.RunPython(setup_tower_managed_defaults),
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user