Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: fix store chinese as unicode, let search failed (#37446)

wangxiaoleifd6c7a40f353
diff --git a/api/tasks/workflow_execution_tasks.py b/api/tasks/workflow_execution_tasks.py
index 5ca04fd7c2e..d1eb24d860d 100644
--- a/api/tasks/workflow_execution_tasks.py
+++ b/api/tasks/workflow_execution_tasks.py
@@ -101,11 +101,13 @@ def _create_workflow_run_from_execution(
workflow_run.triggered_from = triggered_from
workflow_run.version = execution.workflow_version
json_converter = WorkflowRuntimeTypeConverter()
- workflow_run.graph = json.dumps(json_converter.to_json_encodable(execution.graph))
- workflow_run.inputs = json.dumps(json_converter.to_json_encodable(execution.inputs))
+ workflow_run.graph = json.dumps(json_converter.to_json_encodable(execution.graph), ensure_ascii=False)
+ workflow_run.inputs = json.dumps(json_converter.to_json_encodable(execution.inputs), ensure_ascii=False)
workflow_run.status = execution.status
workflow_run.outputs = (
- json.dumps(json_converter.to_json_encodable(execution.outputs)) if execution.outputs else "{}"
+ json.dumps(json_converter.to_json_encodable(execution.outputs), ensure_ascii=False)
+ if execution.outputs
+ else "{}"
)
workflow_run.error = execution.error_message
workflow_run.elapsed_time = execution.elapsed_time