Fix if_else node compatibility with historical workflows. (#6186)
This commit is contained in:
parent
678ad6b7eb
commit
0e82072323
1 changed files with 3 additions and 5 deletions
|
|
@ -60,6 +60,8 @@ class IfElseNode(BaseNode):
|
||||||
|
|
||||||
final_result = all(group_result) if node_data.logical_operator == "and" else any(group_result)
|
final_result = all(group_result) if node_data.logical_operator == "and" else any(group_result)
|
||||||
|
|
||||||
|
selected_case_id = "true" if final_result else "false"
|
||||||
|
|
||||||
process_datas["condition_results"].append(
|
process_datas["condition_results"].append(
|
||||||
{
|
{
|
||||||
"group": "default",
|
"group": "default",
|
||||||
|
|
@ -78,11 +80,7 @@ class IfElseNode(BaseNode):
|
||||||
error=str(e)
|
error=str(e)
|
||||||
)
|
)
|
||||||
|
|
||||||
outputs = {
|
outputs = {"result": final_result, "selected_case_id": selected_case_id}
|
||||||
"result": final_result
|
|
||||||
}
|
|
||||||
if node_data.cases:
|
|
||||||
outputs["selected_case_id"] = selected_case_id
|
|
||||||
|
|
||||||
data = NodeRunResult(
|
data = NodeRunResult(
|
||||||
status=WorkflowNodeExecutionStatus.SUCCEEDED,
|
status=WorkflowNodeExecutionStatus.SUCCEEDED,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue