[PR #14986] [MERGED] 14947 fix for missing changelog if only update m2m #14493

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/14986
Author: @arthanson
Created: 1/30/2024
Status: Merged
Merged: 2/5/2024
Merged by: @jeremystretch

Base: developHead: 14947-changelog


📝 Commits (5)

📊 Changes

1 file changed (+14 additions, -12 deletions)

View changed files

📝 netbox/extras/signals.py (+14 -12)

📄 Description

Fixes: #14947

Fix for missing changelog if only update m2m (tag). Issue is if you only update tags (no other edits) then the changelog entry for the post_save (not m2m_changed) is not created because there are no changes at that point. When the m2m_changed comes in the update does not work because the query is empty.

Fix is if there is an m2m change and there isn't an existing objectchange then create one, otherwise do the update.


🔄 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/14986 **Author:** [@arthanson](https://github.com/arthanson) **Created:** 1/30/2024 **Status:** ✅ Merged **Merged:** 2/5/2024 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop` ← **Head:** `14947-changelog` --- ### 📝 Commits (5) - [`059dda0`](https://github.com/netbox-community/netbox/commit/059dda049d432c6684172ad21de3724e6beecd1f) 14947 fix for missing changelog if only update m2m - [`6bed1ca`](https://github.com/netbox-community/netbox/commit/6bed1cab1cae513800c87c26704396862958e063) 14947 review change - [`110f963`](https://github.com/netbox-community/netbox/commit/110f963813400e70d1a626e4932827ec99008672) 14947 DRY save logic - [`3704367`](https://github.com/netbox-community/netbox/commit/3704367366014d1cd7719bd8a3c14691693d7f54) 14947 DRY save logic - [`fd8a97c`](https://github.com/netbox-community/netbox/commit/fd8a97cb3ec0b6e5d3847b2d734be3c4afd44f71) Refactor logic ### 📊 Changes **1 file changed** (+14 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `netbox/extras/signals.py` (+14 -12) </details> ### 📄 Description ### Fixes: #14947 Fix for missing changelog if only update m2m (tag). Issue is if you only update tags (no other edits) then the changelog entry for the post_save (not m2m_changed) is not created because there are no changes at that point. When the m2m_changed comes in the update does not work because the query is empty. Fix is if there is an m2m change and there isn't an existing objectchange then create one, otherwise do the update. --- <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:24:48 +01:00
adam closed this issue 2025-12-29 23:24:48 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#14493