Try to fix lag field in InterfaceCSVForm...likely to fail

This commit is contained in:
Joseph Kennedy 2017-08-22 20:08:41 -04:00
parent 67bf11ab82
commit f7bb400940

View File

@ -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,