Skip to content

Commit cec3381

Browse files
committed
fix: Update tool_type assignment in ToolSerializer to use instance value
1 parent 37e3662 commit cec3381

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/tools/serializers/tool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -808,7 +808,7 @@ def add(self, instance: Dict, with_valid=True):
808808
input_field_list=tool_data.get('input_field_list', []),
809809
init_field_list=tool_data.get('init_field_list', []),
810810
scope=ToolScope.WORKSPACE,
811-
tool_type=ToolType.CUSTOM,
811+
tool_type=instance.get('tool_type', ToolType.CUSTOM),
812812
folder_id=instance.get('folder_id', self.data.get('workspace_id')),
813813
template_id=self.data.get('tool_id'),
814814
label=instance.get('label'),

0 commit comments

Comments
 (0)