mirror of https://github.com/jumpserver/jumpserver
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
609 B
25 lines
609 B
3 years ago
|
# 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)
|
||
|
]
|