[PR #18946] [MERGED] Fixes #18944: Clearing widget type field no longer causes 500 error #15482

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/18946
Author: @jnovinger
Created: 3/18/2025
Status: Merged
Merged: 3/20/2025
Merged by: @jeremystretch

Base: mainHead: 18944-clearing-widget-type-valueerror


📝 Commits (2)

  • 8514cbe Fixes #18944: Clearing widget type field no longer causes 500 error
  • 8c43eb2 Address PR feedback, cleanup implementation

📊 Changes

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

View changed files

📝 netbox/extras/views.py (+2 -2)

📄 Description

Fixes: #18944

I don't love this fix since the feedback to the user is pretty bad--it just resets the form to defaults without explaining what happened. I didn't find an easy way to include an error message for the 'Widget type' field on GET (so that it might show in the UI) but that may just be me missing something.

I also took a quick look at our DynamicTomSelect code and didn't see an immediate way to fix this there.

Either way, I think it's worth getting at least this fix in for the time being to remove a potentially very visible 500 error for users with better user feedback in a follow up fix. But, I'm open to other options. Thoughts?


🔄 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/18946 **Author:** [@jnovinger](https://github.com/jnovinger) **Created:** 3/18/2025 **Status:** ✅ Merged **Merged:** 3/20/2025 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `main` ← **Head:** `18944-clearing-widget-type-valueerror` --- ### 📝 Commits (2) - [`8514cbe`](https://github.com/netbox-community/netbox/commit/8514cbedeff37531bfb89674377d4678817ab819) Fixes #18944: Clearing widget type field no longer causes 500 error - [`8c43eb2`](https://github.com/netbox-community/netbox/commit/8c43eb29aca31c76701b9517b863e19479e1106d) Address PR feedback, cleanup implementation ### 📊 Changes **1 file changed** (+2 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `netbox/extras/views.py` (+2 -2) </details> ### 📄 Description <!-- 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: #18944 I don't love this fix since the feedback to the user is pretty bad--it just resets the form to defaults without explaining what happened. I didn't find an easy way to include an error message for the 'Widget type' field on GET (so that it might show in the UI) but that may just be me missing something. I also took a quick look at our `DynamicTomSelect` code and didn't see an immediate way to fix this there. Either way, I think it's worth getting at least this fix in for the time being to remove a potentially very visible 500 error for users with better user feedback in a follow up fix. But, I'm open to other options. Thoughts? <!-- Please include a summary of the proposed changes below. --> --- <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:22:12 +01:00
adam closed this issue 2025-12-30 00:22: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#15482