diff --git a/netbox/dcim/forms.py b/netbox/dcim/forms.py index 933e6b626..bc0361b49 100644 --- a/netbox/dcim/forms.py +++ b/netbox/dcim/forms.py @@ -1607,7 +1607,7 @@ class InterfaceCSVForm(forms.ModelForm): device=device_id, form_factor=IFACE_FF_LAG).get( lag=lag_name.id ) - if lag is not None: + if not lag_name: return None return lag