mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-12 21:19:00 +08:00
Fix if_else node compatibility with historical workflows. (#6186)
This commit is contained in:
parent
678ad6b7eb
commit
0e82072323
@ -60,6 +60,8 @@ class IfElseNode(BaseNode):
|
||||
|
||||
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(
|
||||
{
|
||||
"group": "default",
|
||||
@ -78,11 +80,7 @@ class IfElseNode(BaseNode):
|
||||
error=str(e)
|
||||
)
|
||||
|
||||
outputs = {
|
||||
"result": final_result
|
||||
}
|
||||
if node_data.cases:
|
||||
outputs["selected_case_id"] = selected_case_id
|
||||
outputs = {"result": final_result, "selected_case_id": selected_case_id}
|
||||
|
||||
data = NodeRunResult(
|
||||
status=WorkflowNodeExecutionStatus.SUCCEEDED,
|
||||
|
Loading…
x
Reference in New Issue
Block a user