[PR #20586] [MERGED] Closes #19751: Disable occupied Module Bays in form dropdowns #15972

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/20586
Author: @pheus
Created: 10/15/2025
Status: Merged
Merged: 10/20/2025
Merged by: @arthanson

Base: mainHead: 19751-add-occupied-to-modulebay-serializer


📝 Commits (1)

  • aab8ee6 feat(forms): Add context handling for ModuleBay field

📊 Changes

1 file changed (+4 additions, -1 deletions)

View changed files

📝 netbox/dcim/forms/model_forms.py (+4 -1)

📄 Description

Fixes: #19751

Implements the occupied‑bay UI behavior without adding a private _occupied field to the API.

Update the module_bay form field to use context with disabled_indicator: 'installed_module' so occupied bays are disabled in dropdowns

Notes

  • Backward compatible; no database or migration changes
  • Keeps the REST surface clean while providing the needed UI parity

🔄 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/20586 **Author:** [@pheus](https://github.com/pheus) **Created:** 10/15/2025 **Status:** ✅ Merged **Merged:** 10/20/2025 **Merged by:** [@arthanson](https://github.com/arthanson) **Base:** `main` ← **Head:** `19751-add-occupied-to-modulebay-serializer` --- ### 📝 Commits (1) - [`aab8ee6`](https://github.com/netbox-community/netbox/commit/aab8ee6287b5b890f6b368e7fc58e2d1dff12a9f) feat(forms): Add context handling for ModuleBay field ### 📊 Changes **1 file changed** (+4 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `netbox/dcim/forms/model_forms.py` (+4 -1) </details> ### 📄 Description ### Fixes: #19751 Implements the occupied‑bay UI behavior without adding a private `_occupied` field to the API. Update the `module_bay` form field to use context with `disabled_indicator: 'installed_module'` so occupied bays are disabled in dropdowns **Notes** - Backward compatible; no database or migration changes - Keeps the REST surface clean while providing the needed UI parity --- <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:05 +01:00
adam closed this issue 2025-12-30 00:25:05 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#15972