[PR #17327] [MERGED] 12826 make RackType.form_factor required #15064

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/17327
Author: @arthanson
Created: 8/30/2024
Status: Merged
Merged: 8/30/2024
Merged by: @jeremystretch

Base: featureHead: 12826-form-factor


📝 Commits (2)

  • 250fb07 12826 make RackType.form_factor required
  • 4c2f519 12826 fix tests

📊 Changes

4 files changed (+22 additions, -13 deletions)

View changed files

📝 netbox/dcim/migrations/0188_racktype.py (+1 -1)
📝 netbox/dcim/models/racks.py (+11 -6)
📝 netbox/dcim/tests/test_api.py (+6 -3)
📝 netbox/dcim/tests/test_views.py (+4 -3)

📄 Description

Fixes: #12826

Change RackType.form_factor to be unique. Had to move the field out of RackBase, I looked at changing the field options in __init on RackType but that doesn't effect migrations and wanted to make it a database constraint.


🔄 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/17327 **Author:** [@arthanson](https://github.com/arthanson) **Created:** 8/30/2024 **Status:** ✅ Merged **Merged:** 8/30/2024 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `feature` ← **Head:** `12826-form-factor` --- ### 📝 Commits (2) - [`250fb07`](https://github.com/netbox-community/netbox/commit/250fb078d576be2d13dbf8892703d16bda91167b) 12826 make RackType.form_factor required - [`4c2f519`](https://github.com/netbox-community/netbox/commit/4c2f51913ca92fa5f1c61384369ef866eec1a4a4) 12826 fix tests ### 📊 Changes **4 files changed** (+22 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `netbox/dcim/migrations/0188_racktype.py` (+1 -1) 📝 `netbox/dcim/models/racks.py` (+11 -6) 📝 `netbox/dcim/tests/test_api.py` (+6 -3) 📝 `netbox/dcim/tests/test_views.py` (+4 -3) </details> ### 📄 Description ### Fixes: #12826 Change RackType.form_factor to be unique. Had to move the field out of RackBase, I looked at changing the field options in __init on RackType but that doesn't effect migrations and wanted to make it a database constraint. --- <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:19:44 +01:00
adam closed this issue 2025-12-30 00:19:44 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#15064