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) + ]