Code generation improvement for select_option action - use label if value is not present (#3973)

This commit is contained in:
Shuchang Zheng
2025-11-11 17:18:56 -08:00
committed by GitHub
parent 1688f07f94
commit b1e9c76627

View File

@@ -335,6 +335,8 @@ def _action_to_stmt(act: dict[str, Any], task: dict[str, Any], assign_to_output:
elif method == "select_option":
option = act.get("option", {})
value = option.get("value")
label = option.get("label")
value = value or label
if value:
if act.get("field_name"):
option_value = cst.Subscript(