mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-24 08:25:17 -06:00
11617 remove l2vpntermination fix
This commit is contained in:
parent
7d048b38e8
commit
fae151d164
@ -548,11 +548,9 @@ class L2VPNTerminationImportForm(NetBoxModelImportForm):
|
|||||||
|
|
||||||
if self.cleaned_data.get('device') and self.cleaned_data.get('virtual_machine'):
|
if self.cleaned_data.get('device') and self.cleaned_data.get('virtual_machine'):
|
||||||
raise ValidationError('Cannot import device and VM interface terminations simultaneously.')
|
raise ValidationError('Cannot import device and VM interface terminations simultaneously.')
|
||||||
if not self.instance and not (self.cleaned_data.get('interface') or self.cleaned_data.get('vlan')):
|
if not (self.cleaned_data.get('interface') or self.cleaned_data.get('vlan')):
|
||||||
raise ValidationError('Each termination must specify either an interface or a VLAN.')
|
raise ValidationError('Each termination must specify either an interface or a VLAN.')
|
||||||
if self.cleaned_data.get('interface') and self.cleaned_data.get('vlan'):
|
if self.cleaned_data.get('interface') and self.cleaned_data.get('vlan'):
|
||||||
raise ValidationError('Cannot assign both an interface and a VLAN.')
|
raise ValidationError('Cannot assign both an interface and a VLAN.')
|
||||||
|
|
||||||
# if this is an update we might not have interface or vlan in the form data
|
self.instance.assigned_object = self.cleaned_data.get('interface') or self.cleaned_data.get('vlan')
|
||||||
if self.cleaned_data.get('interface') or self.cleaned_data.get('vlan'):
|
|
||||||
self.instance.assigned_object = self.cleaned_data.get('interface') or self.cleaned_data.get('vlan')
|
|
||||||
|
Loading…
Reference in New Issue
Block a user