[PR #18445] [MERGED] Fixes: #18436 - Prevent unassigning mac address when primary on an interface #15351

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/18445
Author: @DanSheps
Created: 1/21/2025
Status: Merged
Merged: 1/24/2025
Merged by: @bctiemann

Base: mainHead: 18436-fix-unassign-mac-with-primary


📝 Commits (3)

  • 277acd3 Fixes: #18436 - Prevent unassigning mac address when primary on an interface
  • 22e3200 Update UI to disable interface assignment when assigned as primary
  • bec97df Fix Tests

📊 Changes

2 files changed (+30 additions, -0 deletions)

View changed files

📝 netbox/dcim/forms/model_forms.py (+5 -0)
📝 netbox/dcim/models/devices.py (+25 -0)

📄 Description

Fixes: #18436 - Prevent unassigning mac address when primary on an interface

  • Prevent unassigning mac address when set as primary on an interface
  • Prevent reassigning mac address when set as primary on an interface
  • Update UI to prevent editing when MACAddress is set as primary

🔄 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/18445 **Author:** [@DanSheps](https://github.com/DanSheps) **Created:** 1/21/2025 **Status:** ✅ Merged **Merged:** 1/24/2025 **Merged by:** [@bctiemann](https://github.com/bctiemann) **Base:** `main` ← **Head:** `18436-fix-unassign-mac-with-primary` --- ### 📝 Commits (3) - [`277acd3`](https://github.com/netbox-community/netbox/commit/277acd3a3198da87f4e87816bf497be6b66e528e) Fixes: #18436 - Prevent unassigning mac address when primary on an interface - [`22e3200`](https://github.com/netbox-community/netbox/commit/22e320084a9906159fdf2770a3c951cd80fc782b) Update UI to disable interface assignment when assigned as primary - [`bec97df`](https://github.com/netbox-community/netbox/commit/bec97df2426e95987959713670eb9debbb3669cf) Fix Tests ### 📊 Changes **2 files changed** (+30 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `netbox/dcim/forms/model_forms.py` (+5 -0) 📝 `netbox/dcim/models/devices.py` (+25 -0) </details> ### 📄 Description ### Fixes: #18436 - Prevent unassigning mac address when primary on an interface * Prevent unassigning mac address when set as primary on an interface * Prevent reassigning mac address when set as primary on an interface * Update UI to prevent editing when `MACAddress` is set as primary --- <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:21:26 +01:00
adam closed this issue 2025-12-30 00:21:27 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#15351