Use cleaned_data

This commit is contained in:
Joseph Kennedy 2017-08-26 01:41:30 -04:00
parent b1ec7dfec2
commit 35110beca8

View File

@ -1598,9 +1598,9 @@ class InterfaceCSVForm(forms.ModelForm):
def clean_lag(self):
device = None
if self.fields['device'] is not None:
if self.cleaned_data['device'] is not None:
lag = Interface.objects.filter(
device=self.fields['device'], form_factor=IFACE_FF_LAG).get(
device=self.cleaned_data['device'], form_factor=IFACE_FF_LAG).get(
lag=self.cleaned_data['lag'], name=lag
)