[PR #15602] [MERGED] Refactor 32264ac3 to re-separate bulk and single device creation. Fix… #14624

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/15602
Author: @padthaitofuhot
Created: 4/3/2024
Status: Merged
Merged: 4/4/2024
Merged by: @jeremystretch

Base: developHead: bugfix-15598-Fix-InventoryItem-BulkCreate


📝 Commits (1)

📊 Changes

1 file changed (+12 additions, -9 deletions)

View changed files

📝 netbox/dcim/models/devices.py (+12 -9)

📄 Description

…es #15598.

Fixes: #15598

In 32264ac3 _instantiate_components() was refactored to ensure all custom fields are initialized with default values. Unfortunately that change broke the separation of singleton and bulk_create behaviors which led to issue #15598. This PR refactors _instantiate_components() to recover that separation while retaining custom field default value initialization.


🔄 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/15602 **Author:** [@padthaitofuhot](https://github.com/padthaitofuhot) **Created:** 4/3/2024 **Status:** ✅ Merged **Merged:** 4/4/2024 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop` ← **Head:** `bugfix-15598-Fix-InventoryItem-BulkCreate` --- ### 📝 Commits (1) - [`415cb30`](https://github.com/netbox-community/netbox/commit/415cb30ba33852f80e84e8306c4e1c8698243f93) Refactor 32264ac3 to re-separate bulk and single device creation. Fixes #15598. ### 📊 Changes **1 file changed** (+12 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `netbox/dcim/models/devices.py` (+12 -9) </details> ### 📄 Description …es #15598. <!-- Thank you for your interest in contributing to NetBox! Please note that our contribution policy requires that a feature request or bug report be approved and assigned prior to opening a pull request. This helps avoid waste time and effort on a proposed change that we might not be able to accept. IF YOUR PULL REQUEST DOES NOT REFERENCE AN ISSUE WHICH HAS BEEN ASSIGNED TO YOU, IT WILL BE CLOSED AUTOMATICALLY. Please specify your assigned issue number on the line below. --> ### Fixes: #15598 <!-- Please include a summary of the proposed changes below. --> In 32264ac3 `_instantiate_components()` was refactored to ensure all custom fields are initialized with default values. Unfortunately that change broke the separation of singleton and `bulk_create` behaviors which led to issue #15598. This PR refactors `_instantiate_components()` to recover that separation while retaining custom field default value initialization. --- <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 23:25:34 +01:00
adam closed this issue 2025-12-29 23:25:34 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#14624