diff --git a/airflow/www/static/js/trigger.js b/airflow/www/static/js/trigger.js index 7a3444f460f41..9242984e75bdf 100644 --- a/airflow/www/static/js/trigger.js +++ b/airflow/www/static/js/trigger.js @@ -59,8 +59,6 @@ function updateJSONconf() { } } params[keyName] = values.length === 0 ? null : values; - } else if (elements[i].value.length === 0) { - params[keyName] = null; } else if ( elements[i].attributes.valuetype && (elements[i].attributes.valuetype.value === "object" || @@ -81,6 +79,8 @@ function updateJSONconf() { // ignore JSON parsing errors // we don't want to bother users during entry, error will be displayed before submit } + } else if (elements[i].value.length === 0) { + params[keyName] = null; } else if (Number.isNaN(elements[i].value)) { params[keyName] = elements[i].value; } else if ( diff --git a/airflow/www/templates/airflow/trigger.html b/airflow/www/templates/airflow/trigger.html index d68f4fc97b867..ff8be7870fd61 100644 --- a/airflow/www/templates/airflow/trigger.html +++ b/airflow/www/templates/airflow/trigger.html @@ -118,7 +118,9 @@ {% elif form_details.schema and "object" in form_details.schema.type %} {% elif form_details.schema and ("integer" in form_details.schema.type or "number" in form_details.schema.type) %}