mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-10 01:28:16 -06:00
-
This commit is contained in:
parent
197529514d
commit
26300649d2
@ -1602,10 +1602,10 @@ class InterfaceCSVForm(forms.ModelForm):
|
|||||||
def clean_lag(self):
|
def clean_lag(self):
|
||||||
device = None
|
device = None
|
||||||
lag_name = self.data.get('lag')
|
lag_name = self.data.get('lag')
|
||||||
if self.data['device'] is not None:
|
if self.data['device'] is not None and lag_name is not None:
|
||||||
lag = Interface.objects.filter(
|
lag = Interface.objects.filter(
|
||||||
device=self.data.get('device'), form_factor=IFACE_FF_LAG).get(
|
device=self.data.get('device'), form_factor=IFACE_FF_LAG).get(
|
||||||
lag=lag_name
|
lag=lag_name.id
|
||||||
)
|
)
|
||||||
if not lag:
|
if not lag:
|
||||||
return None
|
return None
|
||||||
|
Loading…
Reference in New Issue
Block a user