1
0
mirror of https://github.com/peeringdb/peeringdb.git synced 2024-05-11 05:55:09 +00:00

Gh 461 - Implement IX-F Import Toggle (#466)

This commit is contained in:
Matt Griswold
2019-04-01 15:01:36 -05:00
committed by GitHub
parent beaf6ec095
commit 95438d0031
12 changed files with 163 additions and 24 deletions

View File

@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.15 on 2019-03-20 08:02
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('peeringdb_server', '0016_auto_20190110_2321'),
]
operations = [
migrations.AddField(
model_name='ixlan',
name='ixf_ixp_import_enabled',
field=models.BooleanField(default=False),
),
]

View File

@@ -0,0 +1,26 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.15 on 2019-03-20 08:09
from __future__ import unicode_literals
from django.db import migrations, models
def forwards_func(apps, schema_editor):
model = apps.get_model("peeringdb_server", "IXLan")
for ixlan in model.objects.all():
if ixlan.ixf_ixp_member_list_url:
ixlan.ixf_ixp_import_enabled = True
ixlan.save()
class Migration(migrations.Migration):
dependencies = [
('peeringdb_server', '0017_ixf_ixp_import_enabled'),
]
operations = [
migrations.AlterModelManagers(
name='ixlan',
managers=[],
),
migrations.RunPython(forwards_func, migrations.RunPython.noop),
]