mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-22 20:12:00 -06:00
Fixes #3999: Do not filter child results by null if non-required parent fields are blank
This commit is contained in:
parent
cdecf93f00
commit
629712142f
@ -9,6 +9,7 @@
|
||||
|
||||
* [#3983](https://github.com/netbox-community/netbox/issues/3983) - Permit the creation of multiple unnamed devices
|
||||
* [#3989](https://github.com/netbox-community/netbox/issues/3989) - Correct HTTP content type assignment for webhooks
|
||||
* [#3999](https://github.com/netbox-community/netbox/issues/3999) - Do not filter child results by null if non-required parent fields are blank
|
||||
|
||||
---
|
||||
|
||||
|
@ -158,14 +158,17 @@ $(document).ready(function() {
|
||||
|
||||
filter_for_elements.each(function(index, filter_for_element) {
|
||||
var param_name = $(filter_for_element).attr(attr_name);
|
||||
var is_required = $(filter_for_element).attr("required");
|
||||
var is_nullable = $(filter_for_element).attr("nullable");
|
||||
var is_visible = $(filter_for_element).is(":visible");
|
||||
var value = $(filter_for_element).val();
|
||||
|
||||
if (param_name && is_visible && value) {
|
||||
parameters[param_name] = value;
|
||||
} else if (param_name && is_visible && is_nullable) {
|
||||
parameters[param_name] = "null";
|
||||
if (param_name && is_visible) {
|
||||
if (value) {
|
||||
parameters[param_name] = value;
|
||||
} else if (is_required && is_nullable) {
|
||||
parameters[param_name] = "null";
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user