jumpserver/apps/assets/migrations/0097_auto_20220426_1558.py

25 lines
619 B
Python

# Generated by Django 3.1.14 on 2022-04-26 07:58
from django.db import migrations
from assets.const import AllTypes
def create_internal_platforms(apps, *args):
AllTypes.create_or_update_internal_platforms()
def update_user_platforms(apps, *args):
platform_cls = apps.get_model('assets', 'Platform')
AllTypes.update_user_create_platforms(platform_cls)
class Migration(migrations.Migration):
dependencies = [
('assets', '0096_auto_20220426_1550'),
]
operations = [
migrations.RunPython(create_internal_platforms),
migrations.RunPython(update_user_platforms),
]