Commit d096fafb authored by chibrac's avatar chibrac Committed by root

Ajout des états possibles d'après les VLAN

parent 7aa69ab6
# -*- coding: utf-8 -*-
# Generated by Django 1.10.7 on 2017-08-26 16:00
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('topologie', '0023_auto_20170826_1530'),
]
operations = [
migrations.AlterField(
model_name='port',
name='radius',
field=models.CharField(choices=[('NO', 'NO'), ('STRICT', 'STRICT'), ('BLOQ', 'BLOQ'), ('COMMON', 'COMMON')], default='NO', max_length=32),
),
]
......@@ -58,7 +58,10 @@ class Port(models.Model):
('BLOQ', 'BLOQ'),
('COMMON', 'COMMON'),
)
STATES = STATES_BASE + tuple([(str(id), str(id)) for id in list(Vlan.objects.values_list('vlan_id', flat=True).order_by('vlan_id'))])
try:
STATES = STATES_BASE + tuple([(str(id), str(id)) for id in list(Vlan.objects.values_list('vlan_id', flat=True).order_by('vlan_id'))])
except:
STATES = STATES_BASE
switch = models.ForeignKey('Switch', related_name="ports")
port = models.IntegerField()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment