[PR #19024] [MERGED] Fixes #19023: get_field_value() should respect null values in bound forms #15506

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/19024
Author: @jeremystretch
Created: 3/27/2025
Status: Merged
Merged: 3/31/2025
Merged by: @jnovinger

Base: mainHead: 19023-get_field_value-null


📝 Commits (1)

  • abdfeca Fixes #19023: get_field_value() should respect null values in bound forms

📊 Changes

2 files changed (+67 additions, -4 deletions)

View changed files

📝 netbox/utilities/forms/utils.py (+5 -3)
📝 netbox/utilities/tests/test_forms.py (+62 -1)

📄 Description

Fixes: #19023

  • Adapt get_field_value() to return null when the value of a bound field is null, regardless of any initial data provided.
  • Include tests for the six potential scenarios

🔄 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/19024 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 3/27/2025 **Status:** ✅ Merged **Merged:** 3/31/2025 **Merged by:** [@jnovinger](https://github.com/jnovinger) **Base:** `main` ← **Head:** `19023-get_field_value-null` --- ### 📝 Commits (1) - [`abdfeca`](https://github.com/netbox-community/netbox/commit/abdfeca349b72c375d54f7bc48aca13b79517ebe) Fixes #19023: get_field_value() should respect null values in bound forms ### 📊 Changes **2 files changed** (+67 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `netbox/utilities/forms/utils.py` (+5 -3) 📝 `netbox/utilities/tests/test_forms.py` (+62 -1) </details> ### 📄 Description ### Fixes: #19023 - Adapt `get_field_value()` to return null when the value of a bound field is null, regardless of any initial data provided. - Include tests for the six potential scenarios --- <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:22 +01:00
adam closed this issue 2025-12-30 00:22:22 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#15506