From 23f334e5dfadfc7e8e1b1c0e28076bc033298a15 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Mon, 21 Dec 2020 15:30:34 -0500 Subject: [PATCH] Fixes #5488: Fix caching error when viewing cable trace after toggling cable status --- docs/release-notes/version-2.10.md | 1 + netbox/dcim/signals.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/docs/release-notes/version-2.10.md b/docs/release-notes/version-2.10.md index daa5c0eae..00ac081d7 100644 --- a/docs/release-notes/version-2.10.md +++ b/docs/release-notes/version-2.10.md @@ -16,6 +16,7 @@ * [#5484](https://github.com/netbox-community/netbox/issues/5484) - Fix "tagged" indication in VLAN members list * [#5486](https://github.com/netbox-community/netbox/issues/5486) - Optimize retrieval of config context data for device/VM REST API views * [#5487](https://github.com/netbox-community/netbox/issues/5487) - Support filtering rack type/width with multiple values +* [#5488](https://github.com/netbox-community/netbox/issues/5488) - Fix caching error when viewing cable trace after toggling cable status * [#5498](https://github.com/netbox-community/netbox/issues/5498) - Fix filtering rack reservations by username * [#5499](https://github.com/netbox-community/netbox/issues/5499) - Fix filtering of displayed device/VM interfaces by regex * [#5507](https://github.com/netbox-community/netbox/issues/5507) - Fix custom field data assignment via UI for IP addresses, secrets diff --git a/netbox/dcim/signals.py b/netbox/dcim/signals.py index 4a5340748..33c4b461c 100644 --- a/netbox/dcim/signals.py +++ b/netbox/dcim/signals.py @@ -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)