fix: workflow can not init

This commit is contained in:
Joel
2026-01-19 15:15:24 +08:00
parent 3a775fc2bf
commit dd42e7706a
3 changed files with 11 additions and 4 deletions

View File

@ -102,7 +102,10 @@ export const useNodesSyncDraft = () => {
setDraftUpdatedAt,
} = workflowStore.getState()
try {
const res = await syncWorkflowDraft(postParams)
const res = await syncWorkflowDraft({
...postParams,
canNotSaveEmpty: true,
})
setSyncWorkflowDraftHash(res.hash)
setDraftUpdatedAt(res.updated_at)
callback?.onSuccess?.()

View File

@ -107,7 +107,10 @@ export const useNodesSyncDraft = () => {
setDraftUpdatedAt,
} = workflowStore.getState()
try {
const res = await syncWorkflowDraft(postParams)
const res = await syncWorkflowDraft({
...postParams,
canNotSaveEmpty: true,
})
setSyncWorkflowDraftHash(res.hash)
setDraftUpdatedAt(res.updated_at)
callback?.onSuccess?.()