mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-24 08:25:17 -06:00
Include missing assert to ensure links are same type.
This commit is contained in:
parent
5bb373fe2a
commit
4ae7e2f9a8
@ -544,6 +544,7 @@ class CablePath(models.Model):
|
|||||||
# Otherwise, halt the trace if no link exists
|
# Otherwise, halt the trace if no link exists
|
||||||
break
|
break
|
||||||
assert all(type(link) in (Cable, WirelessLink) for link in links)
|
assert all(type(link) in (Cable, WirelessLink) for link in links)
|
||||||
|
assert all(isinstance(link, type(links[0])) for link in links)
|
||||||
|
|
||||||
# Step 3: Record asymmetric paths as split
|
# Step 3: Record asymmetric paths as split
|
||||||
not_connected_terminations = [termination.link for termination in terminations if termination.link is None]
|
not_connected_terminations = [termination.link for termination in terminations if termination.link is None]
|
||||||
|
Loading…
Reference in New Issue
Block a user