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

Fixes #6398: Avoid exception when deleting device connected to self via circuit

This commit is contained in:
jeremystretch
2021-05-14 09:06:00 -04:00
parent 72d41eac85
commit 834b233c30
2 changed files with 4 additions and 2 deletions

View File

@ -31,9 +31,10 @@ def rebuild_paths(obj):
with transaction.atomic():
for cp in cable_paths:
invalidate_obj(cp.origin)
cp.delete()
create_cablepath(cp.origin)
if cp.origin:
invalidate_obj(cp.origin)
create_cablepath(cp.origin)
#