mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Fixes #10201: Fix AssertionError exception when removing some terminations from an existing cable
This commit is contained in:
@ -124,6 +124,9 @@ def nullify_connected_endpoints(instance, **kwargs):
|
||||
model.objects.filter(pk=instance.termination_id).update(cable=None, cable_end='')
|
||||
|
||||
for cablepath in CablePath.objects.filter(_nodes__contains=instance.cable):
|
||||
# Remove the deleted CableTermination if it's one of the path's originating nodes
|
||||
if instance.termination in cablepath.origins:
|
||||
cablepath.origins.remove(instance.termination)
|
||||
cablepath.retrace()
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user