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

Fixes #5488: Fix caching error when viewing cable trace after toggling cable status

This commit is contained in:
Jeremy Stretch
2020-12-21 15:30:34 -05:00
parent c5a265e828
commit 23f334e5df
2 changed files with 3 additions and 0 deletions

View File

@ -1,5 +1,6 @@
import logging
from cacheops import invalidate_obj
from django.contrib.contenttypes.models import ContentType
from django.db.models.signals import post_save, post_delete, pre_delete
from django.db import transaction
@ -30,6 +31,7 @@ def rebuild_paths(obj):
with transaction.atomic():
for cp in cable_paths:
invalidate_obj(cp.origin)
cp.delete()
create_cablepath(cp.origin)