Fix parent reference

This commit is contained in:
Daniel Sheppard 2023-09-19 11:25:21 -05:00
parent 1c2e5525ff
commit 704f9abbf6

View File

@ -520,7 +520,8 @@ class CablePath(models.Model):
# All mid-span terminations must all be attached to the same device
if not isinstance(terminations[0], PathEndpoint):
assert all(t.parent == terminations[0].parent for t in terminations[1:])
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:])
# Check for a split path (e.g. rear port fanning out to multiple front ports with
# different cables attached)