[PR #18108] [CLOSED] Fixes #17810: Fix assignment of device to rack via REST API without specifying position/face #15276

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/18108
Author: @jeremystretch
Created: 11/26/2024
Status: Closed

Base: developHead: 17810-api-rack-device


📝 Commits (1)

  • ca20ff6 Fixes #17810: Fix assignment of device to rack via REST API without specifying position/face

📊 Changes

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

View changed files

netbox/dcim/migrations/0192_device_adjust_rack_position_constraint.py (+30 -0)
📝 netbox/dcim/models/devices.py (+1 -0)

📄 Description

Fixes: #17810

This applies some conditions to the unique constraint on the Device model, which prevents DRF from raising a validation error when rack is set but position is not.


🔄 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/18108 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 11/26/2024 **Status:** ❌ Closed **Base:** `develop` ← **Head:** `17810-api-rack-device` --- ### 📝 Commits (1) - [`ca20ff6`](https://github.com/netbox-community/netbox/commit/ca20ff6b7bc496e5cc9d0952ed1022bbeb5b1c2d) Fixes #17810: Fix assignment of device to rack via REST API without specifying position/face ### 📊 Changes **2 files changed** (+31 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `netbox/dcim/migrations/0192_device_adjust_rack_position_constraint.py` (+30 -0) 📝 `netbox/dcim/models/devices.py` (+1 -0) </details> ### 📄 Description ### Fixes: #17810 This applies some conditions to the unique constraint on the Device model, which prevents DRF from raising a validation error when `rack` is set but `position` is not. --- <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:01 +01:00
adam closed this issue 2025-12-30 00:21:02 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#15276