From 9403b76333b361d7e7246dc8d4898045aea34f5e Mon Sep 17 00:00:00 2001 From: feng <1304903146@qq.com> Date: Mon, 19 Jun 2023 17:29:51 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=20push=5Faccount=5Fpa?= =?UTF-8?q?rams=20=E6=95=B0=E6=8D=AE=E8=BF=81=E7=A7=BB=E9=80=BB=E8=BE=91?= =?UTF-8?q?=EF=BC=8C=E4=B8=8D=E5=9C=A8=E5=AF=BC=E5=85=A5=E5=85=AC=E5=85=B1?= =?UTF-8?q?=E6=96=B9=E6=B3=95=E7=94=9F=E6=88=90=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/assets/migrations/0114_baseautomation_params.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/apps/assets/migrations/0114_baseautomation_params.py b/apps/assets/migrations/0114_baseautomation_params.py index 857c5d795..b48f5b302 100644 --- a/apps/assets/migrations/0114_baseautomation_params.py +++ b/apps/assets/migrations/0114_baseautomation_params.py @@ -2,16 +2,13 @@ from django.db import migrations, models -from assets.const import AllTypes - def migrate_automation_push_account_params(apps, schema_editor): platform_automation_model = apps.get_model('assets', 'PlatformAutomation') - platform_automation_methods = AllTypes.get_automation_methods() methods_id_data_map = { - i['id']: None if i['params_serializer'] is None else i['params_serializer']({}).data - for i in platform_automation_methods - if i['method'] == 'push_account' + 'push_account_aix': {'sudo': '/bin/whoami', 'shell': '/bin/bash', 'home': '', 'groups': ''}, + 'push_account_posix': {'sudo': '/bin/whoami', 'shell': '/bin/bash', 'home': '', 'groups': ''}, + 'push_account_local_windows': {'groups': 'Users,Remote Desktop Users'}, } automation_objs = [] for automation in platform_automation_model.objects.all():