Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

14042 mptt cache count #14048

Merged
merged 3 commits into from
Oct 17, 2023
Merged

14042 mptt cache count #14048

merged 3 commits into from
Oct 17, 2023

Conversation

arthanson
Copy link
Collaborator

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.

@arthanson arthanson marked this pull request as ready for review October 16, 2023 20:09
netbox/utilities/tests/test_counters.py Outdated Show resolved Hide resolved
netbox/utilities/tests/test_counters.py Outdated Show resolved Hide resolved
netbox/utilities/counters.py Outdated Show resolved Hide resolved
Copy link
Member

@jeremystretch jeremystretch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @arthanson!

@jeremystretch jeremystretch merged commit a24864b into develop Oct 17, 2023
8 checks passed
@jeremystretch jeremystretch deleted the 14042-mptt-cache-count branch October 17, 2023 14:32
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Removing Inventory Items with Children Items breaks Inventory count
2 participants