Fixed PEP8 errors

This commit is contained in:
Daniel Sheppard 2019-09-24 11:20:50 -05:00
parent d474fa6bcf
commit f7d96beffa

View File

@ -2861,22 +2861,22 @@ class Cable(ChangeLoggedModel):
# Virtual interfaces cannot be connected
endpoint_a, endpoint_b, _ = self.get_path_endpoints()
if (
(
isinstance(endpoint_a, Interface) and
endpoint_a.type in NONCONNECTABLE_IFACE_TYPES
) or
(
isinstance(endpoint_b, Interface) and
endpoint_b.type in NONCONNECTABLE_IFACE_TYPES
) or
(
isinstance(self.termination_a, Interface) and
self.termination_a.type in NONCONNECTABLE_IFACE_TYPES
) or
(
isinstance(self.termination_b, Interface) and
self.termination_b.type in NONCONNECTABLE_IFACE_TYPES
)
(
isinstance(endpoint_a, Interface) and
endpoint_a.type in NONCONNECTABLE_IFACE_TYPES
) or
(
isinstance(endpoint_b, Interface) and
endpoint_b.type in NONCONNECTABLE_IFACE_TYPES
) or
(
isinstance(self.termination_a, Interface) and
self.termination_a.type in NONCONNECTABLE_IFACE_TYPES
) or
(
isinstance(self.termination_b, Interface) and
self.termination_b.type in NONCONNECTABLE_IFACE_TYPES
)
):
raise ValidationError("Cannot connect to a virtual or wireless interface")