fix: when workflow not has start node can't open service api (#24564)

This commit is contained in:
非法操作
2025-08-26 18:06:11 +08:00
committed by GitHub
parent 392db7f611
commit 2984dbc0df
2 changed files with 9 additions and 3 deletions

View File

@ -73,7 +73,8 @@ function MCPServiceCard({
const serverPublished = !!id
const serverActivated = status === 'active'
const serverURL = serverPublished ? `${appInfo.api_base_url.replace('/v1', '')}/mcp/server/${server_code}/mcp` : '***********'
const toggleDisabled = !isCurrentWorkspaceEditor || appUnpublished
const hasStartNode = currentWorkflow?.graph?.nodes.find(node => node.data.type === BlockEnum.Start)
const toggleDisabled = !isCurrentWorkspaceEditor || appUnpublished || !hasStartNode
const [activated, setActivated] = useState(serverActivated)