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

Migrate CablePath to use two-dimensional array

This commit is contained in:
jeremystretch
2022-05-03 11:32:52 -04:00
parent c22007939b
commit 82706eb3a6
11 changed files with 183 additions and 55 deletions

View File

@@ -133,7 +133,7 @@ def nullify_connected_endpoints(instance, **kwargs):
cp = CablePath.from_origin(cablepath.origin)
if cp:
CablePath.objects.filter(pk=cablepath.pk).update(
path=cp.path,
_nodes=cp._nodes,
destination_type=ContentType.objects.get_for_model(cp.destination) if cp.destination else None,
destination_id=cp.destination.pk if cp.destination else None,
is_active=cp.is_active,