Merge pull request #17 from xueerli/hotfix/workflow

fix(workflow): 重新导入使用update接口
This commit is contained in:
yifanchen90 2023-10-09 10:38:45 +08:00 committed by GitHub
commit d4651ddd96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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,
});
}