1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Extend cable tracing to support terminations to different parent objects

This commit is contained in:
jeremystretch
2022-06-27 15:22:09 -04:00
parent fcd1daaf79
commit 7622d90c1d
2 changed files with 25 additions and 23 deletions

View File

@@ -444,9 +444,8 @@ class CablePath(models.Model):
while terminations:
# Terminations must all be of the same type and belong to the same parent
# Terminations must all be of the same type
assert all(isinstance(t, type(terminations[0])) for t in terminations[1:])
assert all(t.parent_object == terminations[0].parent_object for t in terminations[1:])
# Step 1: Record the near-end termination object(s)
path.append([