Corrected PEP8 errors

This commit is contained in:
Jeremy Stretch 2017-01-13 09:30:59 -05:00
parent 424c2a59d6
commit 466c505bb8

View File

@ -601,18 +601,16 @@ def device(request, pk):
power_outlets = natsorted(
PowerOutlet.objects.filter(device=device).select_related('connected_port'), key=attrgetter('name')
)
interfaces = Interface.objects.order_naturally(device.device_type.interface_ordering)\
.filter(device=device, mgmt_only=False).select_related(
'connected_as_a__interface_b__device',
'connected_as_b__interface_a__device',
'circuit_termination__circuit',
)
mgmt_interfaces = Interface.objects.order_naturally(device.device_type.interface_ordering)\
.filter(device=device, mgmt_only=True).select_related(
'connected_as_a__interface_b__device',
'connected_as_b__interface_a__device',
'circuit_termination__circuit',
)
interfaces = Interface.objects.filter(device=device, mgmt_only=False).select_related(
'connected_as_a__interface_b__device',
'connected_as_b__interface_a__device',
'circuit_termination__circuit',
).order_naturally(device.device_type.interface_ordering)
mgmt_interfaces = Interface.objects.filter(device=device, mgmt_only=True).select_related(
'connected_as_a__interface_b__device',
'connected_as_b__interface_a__device',
'circuit_termination__circuit',
).order_naturally(device.device_type.interface_ordering)
device_bays = natsorted(
DeviceBay.objects.filter(device=device).select_related('installed_device__device_type__manufacturer'),
key=attrgetter('name')