Add test for updated paths on cable status change

This commit is contained in:
Jeremy Stretch
2020-10-01 17:25:44 -04:00
parent 0d07b0346b
commit 3b0a75edf8
4 changed files with 109 additions and 29 deletions

View File

@@ -86,7 +86,7 @@ def update_connected_endpoints(instance, created, **kwargs):
# may change in the future.) However, we do need to capture status changes and update
# any CablePaths accordingly.
if instance.status != CableStatusChoices.STATUS_CONNECTED:
CablePath.objects.filter(path__contains=object_to_path_node(instance)).update(is_connected=False)
CablePath.objects.filter(path__contains=[object_to_path_node(instance)]).update(is_connected=False)
else:
rebuild_paths(instance)