mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-10 01:28:16 -06:00
Remove extraneous line and remove try for error testing
This commit is contained in:
parent
509848031b
commit
da2f1560f4
@ -1597,18 +1597,13 @@ class InterfaceCSVForm(forms.ModelForm):
|
|||||||
|
|
||||||
|
|
||||||
def clean_lag(self):
|
def clean_lag(self):
|
||||||
try:
|
if device is not None:
|
||||||
if device is not None:
|
interface_ordering = device.device_type.interface_ordering
|
||||||
interface_ordering = device.device_type.interface_ordering
|
lag = Interface.objects.order_naturally(method=interface_ordering).filter(
|
||||||
lag = Interface.objects.order_naturally(method=interface_ordering).filter(
|
device=device, form_factor=IFACE_FF_LAG).get(
|
||||||
device=device, form_factor=IFACE_FF_LAG).get(
|
lag=self.cleaned_data['lag'], name=lag
|
||||||
lag=self.cleaned_data['lag'], name=lag
|
)
|
||||||
)
|
|
||||||
self.fields['lag'].queryset = Interface.objects.order_naturally(method=interface_ordering).filter(
|
|
||||||
device=device, form_factor=IFACE_FF_LAG
|
|
||||||
)
|
|
||||||
except:
|
|
||||||
return None
|
|
||||||
|
|
||||||
if not lag:
|
if not lag:
|
||||||
return None
|
return None
|
||||||
|
Loading…
Reference in New Issue
Block a user