mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-07 08:08:15 -06:00
Fix PEP8 whitespace errors
This commit is contained in:
parent
1ccbf746b9
commit
60fd2c4296
@ -1590,15 +1590,12 @@ class InterfaceCSVForm(forms.ModelForm):
|
||||
fields = ('device', 'lag', 'name', 'mac_address', 'form_factor', 'enabled', 'description', 'mtu', 'mgmt_only', 'is_virtual', 'is_wireless', 'is_lag')
|
||||
nullable_fields = ['lag', 'is_virtual', 'is_wireless', 'is_lag']
|
||||
|
||||
|
||||
def clean_interface(self):
|
||||
interface_name = self.cleaned_data.get('interface_name')
|
||||
if not interface:
|
||||
return None
|
||||
|
||||
return interface
|
||||
|
||||
|
||||
def clean_lag(self):
|
||||
device_id = self.cleaned_data.get('device')
|
||||
lag_name = self.cleaned_data.get('lag')
|
||||
|
@ -1146,6 +1146,7 @@ class Interface(models.Model):
|
||||
help_text="This interface is used only for out-of-band management"
|
||||
)
|
||||
description = models.CharField(max_length=100, blank=True)
|
||||
|
||||
objects = InterfaceQuerySet.as_manager()
|
||||
|
||||
csv_headers = ['device', 'lag', 'name', 'mac_address', 'form_factor', 'enabled', 'description', 'mtu', 'mgmt_only', 'is_virtual', 'is_wireless', 'is_connected', 'is_lag']
|
||||
|
@ -550,6 +550,7 @@ class InterfaceImportTable(BaseTable):
|
||||
is_virtual = tables.Column(verbose_name='Is Virtual?')
|
||||
is_wireless = tables.Column(verbose_name='Is Wireless?')
|
||||
is_lag = tables.Column(verbose_name='Is Lag?')
|
||||
|
||||
class Meta(BaseTable.Meta):
|
||||
model = Interface
|
||||
fields = ('device', 'lag', 'name', 'mac_address', 'form_factor', 'enabled', 'description', 'mtu', 'mgmt_only', 'is_virtual', 'is_wireless', 'is_lag')
|
||||
|
Loading…
Reference in New Issue
Block a user