From c64e0ef115d09b8539b1431e7d0b6f95d0883fc4 Mon Sep 17 00:00:00 2001 From: Hao Liu Date: Wed, 20 Jul 2022 13:49:57 -0400 Subject: [PATCH] add migration file to setup managed credential types to add the new credential type Signed-off-by: Hao Liu --- .../0165_added_contentsigning_to_project_model.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/awx/main/migrations/0165_added_contentsigning_to_project_model.py b/awx/main/migrations/0165_added_contentsigning_to_project_model.py index 47214de68f..27683bc682 100644 --- a/awx/main/migrations/0165_added_contentsigning_to_project_model.py +++ b/awx/main/migrations/0165_added_contentsigning_to_project_model.py @@ -3,6 +3,14 @@ from django.db import migrations, models 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): @@ -28,4 +36,5 @@ class Migration(migrations.Migration): to='main.credential', ), ), + migrations.RunPython(setup_tower_managed_defaults), ]