From f9ea119928c67da903961005cdbd2539d914181e Mon Sep 17 00:00:00 2001 From: ibuler Date: Tue, 12 Oct 2021 17:30:52 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=B8=8D=E5=86=8D=E9=9C=80=E8=A6=81=20?= =?UTF-8?q?tls=20=E7=B1=BB=E5=9E=8B=EF=BC=8Cany=20=E6=96=B9=E5=BC=8F?= =?UTF-8?q?=E9=83=BD=E5=8F=AF=E4=BB=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../migrations/0077_auto_20211012_1642.py | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 apps/assets/migrations/0077_auto_20211012_1642.py diff --git a/apps/assets/migrations/0077_auto_20211012_1642.py b/apps/assets/migrations/0077_auto_20211012_1642.py new file mode 100644 index 000000000..6c56917e0 --- /dev/null +++ b/apps/assets/migrations/0077_auto_20211012_1642.py @@ -0,0 +1,24 @@ +# Generated by Django 3.1.12 on 2021-10-12 08:42 + +from django.db import migrations + + +def migrate_platform_win2016(apps, schema_editor): + platform_model = apps.get_model("assets", "Platform") + win2016 = platform_model.objects.filter(name='Windows2016').first() + if not win2016: + print("Error: Not found Windows2016 platform") + return + win2016.meta = {"security": "any"} + win2016.save() + + +class Migration(migrations.Migration): + + dependencies = [ + ('assets', '0076_delete_assetuser'), + ] + + operations = [ + migrations.RunPython(migrate_platform_win2016) + ]