Fixes #4030: Fix exception when bulk editing interfaces (revised)

This commit is contained in:
Jeremy Stretch
2020-01-30 15:12:10 -05:00
parent 1f4b5b506b
commit 3846416492
3 changed files with 22 additions and 9 deletions

View File

@@ -676,7 +676,7 @@ class Interface(CableTermination, ComponentModel):
self.untagged_vlan = None
# Only "tagged" interfaces may have tagged VLANs assigned. ("tagged all" implies all VLANs are assigned.)
if self.pk and self.mode is not InterfaceModeChoices.MODE_TAGGED:
if self.pk and self.mode != InterfaceModeChoices.MODE_TAGGED:
self.tagged_vlans.clear()
return super().save(*args, **kwargs)