mirror of
https://github.com/netbox-community/netbox.git
synced 2026-01-15 08:12:18 -06:00
Fixes: #15924 - Prevent API payload from allowing tagged_vlans while interface mode is set to tagged-all (#17211)
This commit is contained in:
@@ -934,6 +934,8 @@ class Interface(ModularComponentModel, BaseInterface, CabledObjectModel, PathEnd
|
||||
raise ValidationError({'rf_channel_width': _("Cannot specify custom width with channel selected.")})
|
||||
|
||||
# VLAN validation
|
||||
if not self.mode and self.untagged_vlan:
|
||||
raise ValidationError({'untagged_vlan': _("Interface mode does not support an untagged vlan.")})
|
||||
|
||||
# Validate untagged VLAN
|
||||
if self.untagged_vlan and self.untagged_vlan.site not in [self.device.site, None]:
|
||||
|
||||
Reference in New Issue
Block a user