Skip to content

Commit b15c43e

Browse files
committed
fix: update state assignment to use enum values in ToolRecord updates
1 parent a4f8749 commit b15c43e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/application/flow/step_node/tool_lib_node/impl/base_tool_lib_node.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ def tool_exec_record(self, tool_lib, all_params):
265265
result = function_executor.exec_code(tool_lib.code, all_params)
266266
result_dict = _get_result_detail(result)
267267
QuerySet(ToolRecord).filter(id=task_record_id).update(
268-
state=State.SUCCESS,
268+
state=State.SUCCESS.value,
269269
run_time=time.time() - start_time,
270270
meta={'input': all_params, 'output': result_dict}
271271
)
@@ -274,7 +274,7 @@ def tool_exec_record(self, tool_lib, all_params):
274274
except Exception as e:
275275
maxkb_logger.error(f"Tool execution error: {traceback.format_exc()}")
276276
QuerySet(ToolRecord).filter(id=task_record_id).update(
277-
state=State.FAILURE,
277+
state=State.FAILURE.value,
278278
run_time=time.time() - start_time
279279
)
280280

0 commit comments

Comments
 (0)