File tree Expand file tree Collapse file tree
ui/src/views/tool/component Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -613,17 +613,19 @@ def one(self):
613613 'size' : skill_file .file_size ,
614614 } if skill_file else None
615615 work_flow = {}
616+ is_publish = False
616617 if tool .tool_type == 'WORKFLOW' :
617618 tool_workflow = QuerySet (ToolWorkflow ).filter (tool_id = tool .id ).first ()
618619 if tool_workflow :
619620 work_flow = tool_workflow .work_flow
620-
621+ is_publish = tool_workflow . is_publish
621622 return {
622623 ** ToolModelSerializer (tool ).data ,
623624 'init_params' : tool .init_params if tool .init_params else {},
624625 'nick_name' : nick_name ,
625626 'fileList' : [skill_file_dict ] if tool .tool_type == 'SKILL' else [],
626- 'work_flow' : work_flow
627+ 'work_flow' : work_flow ,
628+ 'is_publish' : is_publish
627629 }
628630
629631 def export (self ):
Original file line number Diff line number Diff line change @@ -780,17 +780,16 @@ async function changeState(row: any) {
780780 })
781781 })
782782 } else {
783- if (row .tool_type === ' WORKFLOW' && ! row .is_publish ) {
783+ const res = await loadSharedApi ({ type: ' tool' , systemType: apiType .value }).getToolById (
784+ row .id ,
785+ changeStateloading ,
786+ )
787+ if (row .tool_type === ' WORKFLOW' && ! res .data .is_publish ) {
784788 MsgConfirm (t (' common.tip' ), t (' views.tool.toolWorkflow.toActiveTip' )).then (() => {
785789 toWorkflow (row )
786790 })
787791 return
788792 }
789-
790- const res = await loadSharedApi ({ type: ' tool' , systemType: apiType .value }).getToolById (
791- row .id ,
792- changeStateloading ,
793- )
794793 if (
795794 (! res .data .init_params || Object .keys (res .data .init_params ).length === 0 ) &&
796795 res .data .init_field_list &&
You can’t perform that action at this time.
0 commit comments