From 772009115d2eac496b893f8cb088712355928a1d Mon Sep 17 00:00:00 2001 From: Yeuoly Date: Thu, 28 Nov 2024 19:35:30 +0800 Subject: [PATCH] fix: keep process_data with None if not --- api/core/app/task_pipeline/workflow_cycle_manage.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/api/core/app/task_pipeline/workflow_cycle_manage.py b/api/core/app/task_pipeline/workflow_cycle_manage.py index 29f091f6dc..022a47ba89 100644 --- a/api/core/app/task_pipeline/workflow_cycle_manage.py +++ b/api/core/app/task_pipeline/workflow_cycle_manage.py @@ -292,9 +292,9 @@ class WorkflowCycleManage: db.session.query(WorkflowNodeExecution).filter(WorkflowNodeExecution.id == workflow_node_execution.id).update( { WorkflowNodeExecution.status: WorkflowNodeExecutionStatus.SUCCEEDED.value, - WorkflowNodeExecution.inputs: json.dumps(inputs) if inputs else "{}", - WorkflowNodeExecution.process_data: json.dumps(process_data) if event.process_data else "{}", - WorkflowNodeExecution.outputs: json.dumps(outputs) if outputs else "{}", + WorkflowNodeExecution.inputs: json.dumps(inputs) if inputs else None, + WorkflowNodeExecution.process_data: json.dumps(process_data) if process_data else None, + WorkflowNodeExecution.outputs: json.dumps(outputs) if outputs else None, WorkflowNodeExecution.execution_metadata: execution_metadata, WorkflowNodeExecution.finished_at: finished_at, WorkflowNodeExecution.elapsed_time: elapsed_time, @@ -306,9 +306,9 @@ class WorkflowCycleManage: process_data = WorkflowEntry.handle_special_values(event.process_data) workflow_node_execution.status = WorkflowNodeExecutionStatus.SUCCEEDED.value - workflow_node_execution.inputs = json.dumps(inputs) if inputs else "{}" - workflow_node_execution.process_data = json.dumps(process_data) if process_data else "{}" - workflow_node_execution.outputs = json.dumps(outputs) if outputs else "{}" + workflow_node_execution.inputs = json.dumps(inputs) if inputs else None + workflow_node_execution.process_data = json.dumps(process_data) if process_data else None + workflow_node_execution.outputs = json.dumps(outputs) if outputs else None workflow_node_execution.execution_metadata = execution_metadata workflow_node_execution.finished_at = finished_at workflow_node_execution.elapsed_time = elapsed_time