mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-16 04:28:17 -06:00
Fixed PEP8 errors
This commit is contained in:
parent
d474fa6bcf
commit
f7d96beffa
@ -2861,22 +2861,22 @@ class Cable(ChangeLoggedModel):
|
|||||||
# Virtual interfaces cannot be connected
|
# Virtual interfaces cannot be connected
|
||||||
endpoint_a, endpoint_b, _ = self.get_path_endpoints()
|
endpoint_a, endpoint_b, _ = self.get_path_endpoints()
|
||||||
if (
|
if (
|
||||||
(
|
(
|
||||||
isinstance(endpoint_a, Interface) and
|
isinstance(endpoint_a, Interface) and
|
||||||
endpoint_a.type in NONCONNECTABLE_IFACE_TYPES
|
endpoint_a.type in NONCONNECTABLE_IFACE_TYPES
|
||||||
) or
|
) or
|
||||||
(
|
(
|
||||||
isinstance(endpoint_b, Interface) and
|
isinstance(endpoint_b, Interface) and
|
||||||
endpoint_b.type in NONCONNECTABLE_IFACE_TYPES
|
endpoint_b.type in NONCONNECTABLE_IFACE_TYPES
|
||||||
) or
|
) or
|
||||||
(
|
(
|
||||||
isinstance(self.termination_a, Interface) and
|
isinstance(self.termination_a, Interface) and
|
||||||
self.termination_a.type in NONCONNECTABLE_IFACE_TYPES
|
self.termination_a.type in NONCONNECTABLE_IFACE_TYPES
|
||||||
) or
|
) or
|
||||||
(
|
(
|
||||||
isinstance(self.termination_b, Interface) and
|
isinstance(self.termination_b, Interface) and
|
||||||
self.termination_b.type in NONCONNECTABLE_IFACE_TYPES
|
self.termination_b.type in NONCONNECTABLE_IFACE_TYPES
|
||||||
)
|
)
|
||||||
):
|
):
|
||||||
raise ValidationError("Cannot connect to a virtual or wireless interface")
|
raise ValidationError("Cannot connect to a virtual or wireless interface")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user