Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion apps/tools/serializers/tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,8 @@ def to_tool(tool, workspace_id, user_id, folder_id):
template_id=tool.get('template_id'),
input_field_list=tool.get('input_field_list'),
init_field_list=tool.get('init_field_list'),
is_active=False if len((tool.get('init_field_list') or [])) > 0 else tool.get('is_active'),
is_active=False if (len((tool.get('init_field_list') or [])) > 0 or tool.get(
'tool_type') == ToolType.WORKFLOW) else tool.get('is_active'),
tool_type=tool.get('tool_type', 'CUSTOM') or 'CUSTOM',
scope=ToolScope.SHARED if workspace_id == 'None' else ToolScope.WORKSPACE,
folder_id=folder_id if folder_id else 'default' if workspace_id == 'None' else workspace_id,
Expand Down
Loading