[PR #3971] [MERGED] Display occupied rack units correctly #12712

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/3971
Author: @hellerve
Created: 1/21/2020
Status: Merged
Merged: 1/21/2020
Merged by: @jeremystretch

Base: developHead: veit/fix-3965


📝 Commits (3)

  • 255d123 dcim: fix #3965 by adding an option to get_rack_units
  • e421c15 dcim: merge elevations as necessary
  • e184eb3 dcim: make pep happy

📊 Changes

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

View changed files

📝 netbox/dcim/models/__init__.py (+16 -1)

📄 Description

Fixes: #3965

This PR reintroduces code to mark a slot in the rack elevation as occupied if the other side is occupied. This problem was introduced when @lampwins took over the initial draft that I made, because I didn’t correctly explain the differences of my version of get_rack_units to the “vanilla” one. get_rack_units now has a flag named always_show_device that will even put the device in the elevation even if the face is different.

Cheers


🔄 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/3971 **Author:** [@hellerve](https://github.com/hellerve) **Created:** 1/21/2020 **Status:** ✅ Merged **Merged:** 1/21/2020 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop` ← **Head:** `veit/fix-3965` --- ### 📝 Commits (3) - [`255d123`](https://github.com/netbox-community/netbox/commit/255d12309a4cec652d660b102c1b5848a7513413) dcim: fix #3965 by adding an option to get_rack_units - [`e421c15`](https://github.com/netbox-community/netbox/commit/e421c15bddb37e9fc34405107cc6d0b0cb365432) dcim: merge elevations as necessary - [`e184eb3`](https://github.com/netbox-community/netbox/commit/e184eb3521238f93ce0750558a4c1bb9ee3a06ab) dcim: make pep happy ### 📊 Changes **1 file changed** (+16 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `netbox/dcim/models/__init__.py` (+16 -1) </details> ### 📄 Description ### Fixes: #3965 This PR reintroduces code to mark a slot in the rack elevation as occupied if the other side is occupied. This problem was introduced when @lampwins took over the initial draft that I made, because I didn’t correctly explain the differences of my version of `get_rack_units` to the “vanilla” one. `get_rack_units` now has a flag named `always_show_device` that will even put the device in the elevation even if the face is different. Cheers --- <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:23:12 +01:00
adam closed this issue 2025-12-29 22:23:12 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#12712