mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-10 01:28:16 -06:00
use self.device
This commit is contained in:
parent
da2f1560f4
commit
17428e7057
@ -1597,10 +1597,10 @@ class InterfaceCSVForm(forms.ModelForm):
|
|||||||
|
|
||||||
|
|
||||||
def clean_lag(self):
|
def clean_lag(self):
|
||||||
if device is not None:
|
if self.device is not None:
|
||||||
interface_ordering = device.device_type.interface_ordering
|
interface_ordering = self.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=self.device, form_factor=IFACE_FF_LAG).get(
|
||||||
lag=self.cleaned_data['lag'], name=lag
|
lag=self.cleaned_data['lag'], name=lag
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user