[PR #14048] [MERGED] 14042 mptt cache count #14304

Closed
opened 2025-12-29 23:23:42 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/14048
Author: @arthanson
Created: 10/16/2023
Status: Merged
Merged: 10/17/2023
Merged by: @jeremystretch

Base: developHead: 14042-mptt-cache-count


📝 Commits (3)

📊 Changes

2 files changed (+32 additions, -5 deletions)

View changed files

📝 netbox/utilities/counters.py (+4 -2)
📝 netbox/utilities/tests/test_counters.py (+28 -3)

📄 Description

Fixes: #14042

MPTT code is causing two delete signals to come through if nested objects, in this case the instance and origin (from kwargs) are different so put in a check to ignore updating the counter if this is the case.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/14048 **Author:** [@arthanson](https://github.com/arthanson) **Created:** 10/16/2023 **Status:** ✅ Merged **Merged:** 10/17/2023 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop` ← **Head:** `14042-mptt-cache-count` --- ### 📝 Commits (3) - [`8fc41f9`](https://github.com/netbox-community/netbox/commit/8fc41f9aaf82f06029d7e43f69652f5d82a5b823) 14042 fix cache count for mptt child delete - [`3d05bdb`](https://github.com/netbox-community/netbox/commit/3d05bdba8751c6372b06581010fee5f0b6b22ed5) 14042 add test - [`46b8c0e`](https://github.com/netbox-community/netbox/commit/46b8c0e2302fbd86a68928f92ae72ae6ba894fae) Misc cleanup ### 📊 Changes **2 files changed** (+32 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `netbox/utilities/counters.py` (+4 -2) 📝 `netbox/utilities/tests/test_counters.py` (+28 -3) </details> ### 📄 Description ### Fixes: #14042 MPTT code is causing two delete signals to come through if nested objects, in this case the instance and origin (from kwargs) are different so put in a check to ignore updating the counter if this is the case. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 23:23:42 +01:00
adam closed this issue 2025-12-29 23:23:42 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#14304