mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-07 08:08:15 -06:00
-
This commit is contained in:
parent
197529514d
commit
26300649d2
@ -1602,10 +1602,10 @@ class InterfaceCSVForm(forms.ModelForm):
|
||||
def clean_lag(self):
|
||||
device = None
|
||||
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(
|
||||
device=self.data.get('device'), form_factor=IFACE_FF_LAG).get(
|
||||
lag=lag_name
|
||||
lag=lag_name.id
|
||||
)
|
||||
if not lag:
|
||||
return None
|
||||
|
Loading…
Reference in New Issue
Block a user