Skip to content

Commit 7b25985

Browse files
Tomi-1997Your friendly bot
authored andcommitted
[v3-1-test] BUGFIX: trigger ui parameter field is dict when param.value is null (#58682)
* return 'null' when param.value is null, rather than typeof(null) * added 'null' to list of enum types (cherry picked from commit 0adfc5b) Co-authored-by: Tomi <74303735+Tomi-1997@users.noreply.github.com>
1 parent 141b0a0 commit 7b25985

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

airflow-core/src/airflow/ui/src/components/FlexibleForm/FieldSelector.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ const inferType = (param: ParamSpec) => {
4747
return "array";
4848
}
4949

50+
// Missing value, return 'null' as typeof(null) = 'dict'
51+
if (param.value === null) {
52+
return "null";
53+
}
54+
5055
return typeof param.value;
5156
};
5257

@@ -61,7 +66,7 @@ const isFieldDate = (fieldType: string, fieldSchema: ParamSchema) =>
6166
const isFieldDateTime = (fieldType: string, fieldSchema: ParamSchema) =>
6267
fieldType === "string" && fieldSchema.format === "date-time";
6368

64-
const enumTypes = ["string", "number", "integer"];
69+
const enumTypes = ["null", "string", "number", "integer"];
6570

6671
const isFieldDropdown = (fieldType: string, fieldSchema: ParamSchema) =>
6772
enumTypes.includes(fieldType) && Array.isArray(fieldSchema.enum);

0 commit comments

Comments
 (0)