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

@ -9,6 +9,7 @@
### Bug Fixes ### Bug Fixes
* [#6376](https://github.com/netbox-community/netbox/issues/6376) - Fix assignment of VLAN groups to clusters, cluster groups via REST API * [#6376](https://github.com/netbox-community/netbox/issues/6376) - Fix assignment of VLAN groups to clusters, cluster groups via REST API
* [#6398](https://github.com/netbox-community/netbox/issues/6398) - Avoid exception when deleting device connected to self via circuit
--- ---

View File

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