mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-28 03:16:25 -06:00
Fix ruff errors
This commit is contained in:
parent
afb748cf2c
commit
e858706080
@ -43,7 +43,6 @@ class InterfaceCommonForm(forms.Form):
|
||||
super().clean()
|
||||
|
||||
parent_field = 'device' if 'device' in self.cleaned_data else 'virtual_machine'
|
||||
interface_mode = get_field_value(self, parent_field)
|
||||
if 'tagged_vlans' in self.fields.keys():
|
||||
tagged_vlans = self.cleaned_data.get('tagged_vlans') if self.is_bound else \
|
||||
self.get_initial_for_field(self.fields['tagged_vlans'], 'tagged_vlans')
|
||||
|
@ -14,7 +14,7 @@ from ipam.models import ASN, RIR, VLAN, VRF
|
||||
from netbox.api.serializers import GenericObjectSerializer
|
||||
from tenancy.models import Tenant
|
||||
from users.models import User
|
||||
from utilities.testing import APITestCase, APIViewTestCases, create_test_device, disable_warnings
|
||||
from utilities.testing import APITestCase, APIViewTestCases, create_test_device
|
||||
from virtualization.models import Cluster, ClusterType
|
||||
from wireless.choices import WirelessChannelChoices
|
||||
from wireless.models import WirelessLAN
|
||||
@ -1782,8 +1782,6 @@ class InterfaceTest(Mixins.ComponentTraceMixin, APIViewTestCases.APIViewTestCase
|
||||
POST a single object without permission.
|
||||
"""
|
||||
self.add_permissions('dcim.add_interface')
|
||||
url = self._get_list_url()
|
||||
initial_count = self._get_queryset().count()
|
||||
|
||||
device = Device.objects.first()
|
||||
vlans = VLAN.objects.all()[0:3]
|
||||
|
Loading…
Reference in New Issue
Block a user