1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Limit tagged validation to tagged interfaces

Co-Authored-By: Jeremy Stretch <jeremy.stretch@networktocode.com>
This commit is contained in:
hSaria
2020-01-02 17:52:22 +00:00
committed by GitHub
parent 7ad9e8a2fb
commit d3c6caf8a8

View File

@@ -75,7 +75,7 @@ class InterfaceCommonForm:
self.cleaned_data['tagged_vlans'] = []
# Validate tagged VLANs; must be a global VLAN or in the same site
else:
elif self.cleaned_data['mode'] == IFACE_MODE_TAGGED:
valid_sites = [None, self.cleaned_data['device'].site]
invalid_vlans = [str(v) for v in tagged_vlans if v.site not in valid_sites]