From 46797f07277ea08265d8cf3f80ee543e132810ed Mon Sep 17 00:00:00 2001 From: HugoCasa Date: Fri, 21 Mar 2025 00:31:23 +0100 Subject: [PATCH] add missing capture move on first time deploy (#5496) --- frontend/src/lib/components/FlowBuilder.svelte | 8 ++++++++ frontend/src/lib/components/ScriptBuilder.svelte | 11 +++++++++++ 2 files changed, 19 insertions(+) diff --git a/frontend/src/lib/components/FlowBuilder.svelte b/frontend/src/lib/components/FlowBuilder.svelte index d09f34ce7d..adb5331a6e 100644 --- a/frontend/src/lib/components/FlowBuilder.svelte +++ b/frontend/src/lib/components/FlowBuilder.svelte @@ -391,6 +391,14 @@ deployment_message: deploymentMsg || undefined } }) + await CaptureService.moveCapturesAndConfigs({ + workspace: $workspaceStore!, + path: fakeInitialPath, + requestBody: { + new_path: $pathStore + }, + runnableKind: 'flow' + }) if ($primaryScheduleStore && $primaryScheduleStore.enabled) { await createSchedule($pathStore) } diff --git a/frontend/src/lib/components/ScriptBuilder.svelte b/frontend/src/lib/components/ScriptBuilder.svelte index 93f40cc104..d7ffde2def 100644 --- a/frontend/src/lib/components/ScriptBuilder.svelte +++ b/frontend/src/lib/components/ScriptBuilder.svelte @@ -471,6 +471,17 @@ } }) + if (!initialPath) { + await CaptureService.moveCapturesAndConfigs({ + workspace: $workspaceStore!, + path: fakeInitialPath, + requestBody: { + new_path: script.path + }, + runnableKind: 'script' + }) + } + const scheduleExists = initialPath != '' && (await ScheduleService.existsSchedule({