[PR #12408] [CLOSED] Fixes #12402 - When bulk-importing related objects, add the errors to the base form instead of the model_form #13966

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/12408
Author: @kkthxbye-code
Created: 5/1/2023
Status: Closed

Base: developHead: 12402-fix-bulk-errors


📝 Commits (1)

  • be34436 When bulk-importing related objects, add the errors to the base form instead of the model_form

📊 Changes

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

View changed files

📝 netbox/netbox/views/generic/bulk_views.py (+3 -3)

📄 Description

Fixes: #12402

The errors of related models are currently added to the model_form. If there's any errors in a related object form, an AbortTransaction is thrown. The errors saved on the model form are never replicated to the base form and thus are never shown on the form.

I'm really unsure of the fix in this PR, but it seems to work. The code is pretty complex imo, a lot of different forms being passed around, so not sure if there's a better way. Feel free to just close this PR and fix it another way, just wanted to have it written down.


🔄 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/12408 **Author:** [@kkthxbye-code](https://github.com/kkthxbye-code) **Created:** 5/1/2023 **Status:** ❌ Closed **Base:** `develop` ← **Head:** `12402-fix-bulk-errors` --- ### 📝 Commits (1) - [`be34436`](https://github.com/netbox-community/netbox/commit/be344369de26de12b0a3499a9d0599d97b124d63) When bulk-importing related objects, add the errors to the base form instead of the model_form ### 📊 Changes **1 file changed** (+3 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `netbox/netbox/views/generic/bulk_views.py` (+3 -3) </details> ### 📄 Description ### Fixes: #12402 The errors of related models are currently added to the `model_form`. If there's any errors in a related object form, an AbortTransaction is thrown. The errors saved on the model form are never replicated to the base form and thus are never shown on the form. I'm really unsure of the fix in this PR, but it seems to work. The code is pretty complex imo, a lot of different forms being passed around, so not sure if there's a better way. Feel free to just close this PR and fix it another way, just wanted to have it written down. --- <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:21:48 +01:00
adam closed this issue 2025-12-29 23:21:49 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#13966