From e7b49bd5fa6985423f88549d7724ef273bdda8a1 Mon Sep 17 00:00:00 2001 From: Gabriel Detraz Date: Tue, 26 Jun 2018 17:12:52 +0000 Subject: [PATCH] Pas de null sur manytomany --- topologie/migrations/0061_portprofile.py | 2 +- topologie/models.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/topologie/migrations/0061_portprofile.py b/topologie/migrations/0061_portprofile.py index 2b326f28..d0e84021 100644 --- a/topologie/migrations/0061_portprofile.py +++ b/topologie/migrations/0061_portprofile.py @@ -31,7 +31,7 @@ class Migration(migrations.Migration): ('arp_protect', models.BooleanField(default=False, help_text="Verification assignation de l'IP par dhcp", verbose_name='Arp protect')), ('ra_guard', models.BooleanField(default=False, help_text='Protection contre ra pirate', verbose_name='Ra guard')), ('loop_protect', models.BooleanField(default=False, help_text='Protection contre les boucles', verbose_name='Loop Protect')), - ('vlan_tagged', models.ManyToManyField(blank=True, null=True, related_name='vlan_tagged', to='machines.Vlan', verbose_name='VLAN(s) tagged')), + ('vlan_tagged', models.ManyToManyField(blank=True, related_name='vlan_tagged', to='machines.Vlan', verbose_name='VLAN(s) tagged')), ('vlan_untagged', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='vlan_untagged', to='machines.Vlan', verbose_name='VLAN untagged')), ], options={ diff --git a/topologie/models.py b/topologie/models.py index c7f0e28f..86beed71 100644 --- a/topologie/models.py +++ b/topologie/models.py @@ -537,7 +537,6 @@ class PortProfile(AclMixin, RevMixin, models.Model): 'machines.Vlan', related_name='vlan_tagged', blank=True, - null=True, verbose_name=_("VLAN(s) tagged") ) radius_type = models.CharField(