mirror of https://gitlab.federez.net/re2o/re2o
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.
35 lines
1005 B
35 lines
1005 B
# -*- coding: utf-8 -*-
|
|
# Generated by Django 1.10.7 on 2018-10-13 14:29
|
|
from __future__ import unicode_literals
|
|
|
|
from django.db import migrations, models
|
|
import django.db.models.deletion
|
|
import re2o.mixins
|
|
|
|
|
|
def create_radius_policy(apps, schema_editor):
|
|
OptionalTopologie = apps.get_model("preferences", "OptionalTopologie")
|
|
RadiusOption = apps.get_model("preferences", "RadiusOption")
|
|
|
|
option, _ = OptionalTopologie.objects.get_or_create()
|
|
|
|
radius_option = RadiusOption()
|
|
radius_option.radius_general_policy = option.radius_general_policy
|
|
radius_option.vlan_decision_ok = option.vlan_decision_ok
|
|
|
|
radius_option.save()
|
|
|
|
|
|
def revert_radius(apps, schema_editor):
|
|
pass
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
("machines", "0095_auto_20180919_2225"),
|
|
("preferences", "0055_generaloption_main_site_url"),
|
|
("preferences", "0056_1_radiusoption"),
|
|
]
|
|
|
|
operations = [migrations.RunPython(create_radius_policy, revert_radius)]
|
|
|