From 8d0d3528d6d5597080d6ea2f2668097a7322fb95 Mon Sep 17 00:00:00 2001 From: Daniel Sheppard Date: Tue, 24 Sep 2019 08:39:41 -0500 Subject: [PATCH] Fixes: #3534 - Add none option for untagged vlan field --- netbox/dcim/forms.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/netbox/dcim/forms.py b/netbox/dcim/forms.py index aec7a6723..939470756 100644 --- a/netbox/dcim/forms.py +++ b/netbox/dcim/forms.py @@ -2220,7 +2220,7 @@ class InterfaceForm(InterfaceCommonForm, BootstrapMixin, forms.ModelForm): [(vlan.pk, vlan) for vlan in site_group_vlans] )) - self.fields['untagged_vlan'].choices = vlan_choices + self.fields['untagged_vlan'].choices = [(None, '---------')] + vlan_choices self.fields['tagged_vlans'].choices = vlan_choices @@ -2330,7 +2330,7 @@ class InterfaceCreateForm(InterfaceCommonForm, ComponentForm, forms.Form): [(vlan.pk, vlan) for vlan in site_group_vlans] )) - self.fields['untagged_vlan'].choices = vlan_choices + self.fields['untagged_vlan'].choices = [(None, '---------')] + vlan_choices self.fields['tagged_vlans'].choices = vlan_choices @@ -2442,7 +2442,7 @@ class InterfaceBulkEditForm(InterfaceCommonForm, BootstrapMixin, AddRemoveTagsFo [(vlan.pk, vlan) for vlan in site_group_vlans] )) - self.fields['untagged_vlan'].choices = vlan_choices + self.fields['untagged_vlan'].choices = [(None, '---------')] + vlan_choices self.fields['tagged_vlans'].choices = vlan_choices