From 197529514d444aad330786a5bd588d4091e14475 Mon Sep 17 00:00:00 2001 From: Joseph Kennedy Date: Sat, 26 Aug 2017 21:56:04 -0400 Subject: [PATCH] Try a different to_field_name --- netbox/dcim/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netbox/dcim/forms.py b/netbox/dcim/forms.py index 048b0da4b..40a7c775e 100644 --- a/netbox/dcim/forms.py +++ b/netbox/dcim/forms.py @@ -1543,7 +1543,7 @@ class InterfaceCSVForm(forms.ModelForm): ) lag = FlexibleModelChoiceField( queryset=Interface.objects.filter(form_factor=IFACE_FF_LAG), - to_field_name='name', + to_field_name='lag', required=False, help_text='Lag Name or ID of interface', error_messages={'invalid_choice': 'Lag not found.'}