mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-07 08:08:15 -06:00
Trying self.fields attributes
This commit is contained in:
parent
e92a72cdb6
commit
952f6e7754
@ -1598,10 +1598,10 @@ class InterfaceCSVForm(forms.ModelForm):
|
||||
|
||||
def clean_lag(self):
|
||||
device = None
|
||||
if self.device is not None:
|
||||
interface_ordering = self.device.device_type.interface_ordering
|
||||
if self.fields['device'] is not None:
|
||||
interface_ordering = self.fields['device'].device_type.interface_ordering
|
||||
lag = Interface.objects.order_naturally(method=interface_ordering).filter(
|
||||
device=self.device, form_factor=IFACE_FF_LAG).get(
|
||||
device=self.fields['device'], form_factor=IFACE_FF_LAG).get(
|
||||
lag=self.cleaned_data['lag'], name=lag
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user