[PR #20739] [MERGED] 20738 update vc_position in delete not signal handler #16035

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/20739
Author: @arthanson
Created: 11/3/2025
Status: Merged
Merged: 11/6/2025
Merged by: @bctiemann

Base: mainHead: 20738-vc-delete


📝 Commits (3)

  • 264b40a 20738 update vc_position in delete not signal handler
  • 20af97c 20738 update vc_position in delete not signal handler
  • 8522c03 20738 add tests

📊 Changes

3 files changed (+97 additions, -14 deletions)

View changed files

📝 netbox/dcim/models/devices.py (+7 -1)
📝 netbox/dcim/signals.py (+1 -13)
📝 netbox/dcim/tests/test_models.py (+89 -0)

📄 Description

Fixes: #20738

vc_position and vc_priority were getting set to None when a virtual chassis was deleted, however the signal handler is getting run after the set_null is already getting run meaning no devices were found in the loop and so they were never getting cleared. Moved this to this functionality to the delete method.


🔄 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/20739 **Author:** [@arthanson](https://github.com/arthanson) **Created:** 11/3/2025 **Status:** ✅ Merged **Merged:** 11/6/2025 **Merged by:** [@bctiemann](https://github.com/bctiemann) **Base:** `main` ← **Head:** `20738-vc-delete` --- ### 📝 Commits (3) - [`264b40a`](https://github.com/netbox-community/netbox/commit/264b40a269a6d63d32c7ac2920055538290b608c) 20738 update vc_position in delete not signal handler - [`20af97c`](https://github.com/netbox-community/netbox/commit/20af97ce24976a88a1f2454b9a49a2f5bd4585ec) 20738 update vc_position in delete not signal handler - [`8522c03`](https://github.com/netbox-community/netbox/commit/8522c03b719c07f149bd41fc79a688adef996247) 20738 add tests ### 📊 Changes **3 files changed** (+97 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `netbox/dcim/models/devices.py` (+7 -1) 📝 `netbox/dcim/signals.py` (+1 -13) 📝 `netbox/dcim/tests/test_models.py` (+89 -0) </details> ### 📄 Description ### Fixes: #20738 vc_position and vc_priority were getting set to None when a virtual chassis was deleted, however the signal handler is getting run after the set_null is already getting run meaning no devices were found in the loop and so they were never getting cleared. Moved this to this functionality to the delete method. --- <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-30 00:25:25 +01:00
adam closed this issue 2025-12-30 00:25:25 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#16035