[PR #5522] [MERGED] Employ signals to update child objects when RackGroup/Rack site assignment changes #13034

Closed
opened 2025-12-29 22:25:03 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/5522
Author: @jeremystretch
Created: 12/22/2020
Status: Merged
Merged: 12/23/2020
Merged by: @jeremystretch

Base: developHead: 5311-site-rack-validation


📝 Commits (2)

  • e4f22bc Employ signals to update child objects when RackGroup/Rack site assignment changes
  • 8d9d4ce Extend handle_rackgroup_site_change() receiver to update power panels

📊 Changes

3 files changed (+107 additions, -17 deletions)

View changed files

📝 netbox/dcim/models/racks.py (+0 -16)
📝 netbox/dcim/signals.py (+43 -1)
📝 netbox/dcim/tests/test_models.py (+64 -0)

📄 Description

Fixes: #5311

  • Remove custom logic from Rack.save()
  • Add signal receivers to handle site assignment changes for racks and rack groups
  • Add tests to cover all cases defined in #5311

🔄 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/5522 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 12/22/2020 **Status:** ✅ Merged **Merged:** 12/23/2020 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop` ← **Head:** `5311-site-rack-validation` --- ### 📝 Commits (2) - [`e4f22bc`](https://github.com/netbox-community/netbox/commit/e4f22bc4941ecea0e3828c71b29ac91bfe213f65) Employ signals to update child objects when RackGroup/Rack site assignment changes - [`8d9d4ce`](https://github.com/netbox-community/netbox/commit/8d9d4cec051c8b0e5433db538b2ae0a5debb92ea) Extend handle_rackgroup_site_change() receiver to update power panels ### 📊 Changes **3 files changed** (+107 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `netbox/dcim/models/racks.py` (+0 -16) 📝 `netbox/dcim/signals.py` (+43 -1) 📝 `netbox/dcim/tests/test_models.py` (+64 -0) </details> ### 📄 Description ### Fixes: #5311 - Remove custom logic from `Rack.save()` - Add signal receivers to handle site assignment changes for racks and rack groups - Add tests to cover all cases defined in #5311 --- <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 22:25:03 +01:00
adam closed this issue 2025-12-29 22:25:03 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#13034