diff --git a/netbox/dcim/forms.py b/netbox/dcim/forms.py index 7c6830b81..08ecb5d47 100644 --- a/netbox/dcim/forms.py +++ b/netbox/dcim/forms.py @@ -1541,9 +1541,11 @@ class InterfaceCSVForm(forms.ModelForm): name = forms.CharField( help_text='Name of interface' ) - lag = forms.CharField( + lag = FlexibleModelChoiceField( required=False, - help_text='Lag Name' + queryset = Interface.objects.order_naturally().filter(form_factor=IFACE_FF_LAG) + help_text='Lag Name', + error_messages={'invalid_choice': 'Lag not found.'} ) mac_address = forms.CharField( required=False,