fix(workflow): 重新导入使用update接口

This commit is contained in:
lixue.er 2023-10-09 10:32:58 +08:00
parent ccd3121e99
commit cb1252c05b
1 changed files with 1 additions and 2 deletions

View File

@ -71,7 +71,7 @@ function ImportModal({ visible, workflowInfo, onClose, refetch }: Props) {
async function handleSubmit(values) {
let res;
if (isEdit) {
if (isEdit || isReimport) {
res = await Api.workspaceIdWorkflowPartialUpdate(
match.params.workspaceId,
workflowInfo.id,
@ -85,7 +85,6 @@ function ImportModal({ visible, workflowInfo, onClose, refetch }: Props) {
res = await Api.workspaceIdWorkflowCreate(match.params.workspaceId, {
...values,
source: 'git',
id: isReimport ? workflowInfo.id : undefined,
});
}