From 18d681db52d4c8aa95bbcbcfefc0eac6aefbf5dd Mon Sep 17 00:00:00 2001 From: QuantumGhost Date: Wed, 4 Jun 2025 11:44:52 +0800 Subject: [PATCH] fix(api): Fix the issue that conversation variable saving not working --- api/core/workflow/nodes/variable_assigner/common/helpers.py | 2 +- api/core/workflow/nodes/variable_assigner/v2/node.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/core/workflow/nodes/variable_assigner/common/helpers.py b/api/core/workflow/nodes/variable_assigner/common/helpers.py index c850449b2d..83f00cef7d 100644 --- a/api/core/workflow/nodes/variable_assigner/common/helpers.py +++ b/api/core/workflow/nodes/variable_assigner/common/helpers.py @@ -28,7 +28,7 @@ def variable_to_processed_data(selector: Sequence[str], seg: Segment) -> Updated def set_updated_variables(m: _T, updates: Sequence[UpdatedVariable]) -> _T: - # m[_UPDATED_VARIABLES_KEY] = updates + m[_UPDATED_VARIABLES_KEY] = updates return m diff --git a/api/core/workflow/nodes/variable_assigner/v2/node.py b/api/core/workflow/nodes/variable_assigner/v2/node.py index 62a1b9db1b..71ba96fd45 100644 --- a/api/core/workflow/nodes/variable_assigner/v2/node.py +++ b/api/core/workflow/nodes/variable_assigner/v2/node.py @@ -168,7 +168,7 @@ class VariableAssignerNode(BaseNode[VariableAssignerNodeData]): if (seg := self.graph_runtime_state.variable_pool.get(selector)) is not None ] - common_helpers.set_updated_variables(process_data, updated_variables) + process_data = common_helpers.set_updated_variables(process_data, updated_variables) return NodeRunResult( status=WorkflowNodeExecutionStatus.SUCCEEDED, inputs=inputs,