From 2bcd3cb8e8a3ae8f2d20fd5cbb5f78f7e9dee543 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Tue, 26 Mar 2024 22:15:57 +0100 Subject: [PATCH] fix: fix approval steps handling of default args --- frontend/res.json | 1 + .../src/lib/components/FlowStatusWaitingForEvents.svelte | 5 +++++ 2 files changed, 6 insertions(+) create mode 100644 frontend/res.json diff --git a/frontend/res.json b/frontend/res.json new file mode 100644 index 0000000000..4c89aae894 --- /dev/null +++ b/frontend/res.json @@ -0,0 +1 @@ +{"started":true,"success":true,"completed":true,"result":""} \ No newline at end of file diff --git a/frontend/src/lib/components/FlowStatusWaitingForEvents.svelte b/frontend/src/lib/components/FlowStatusWaitingForEvents.svelte index c207bfb58b..72ddfd141c 100644 --- a/frontend/src/lib/components/FlowStatusWaitingForEvents.svelte +++ b/frontend/src/lib/components/FlowStatusWaitingForEvents.svelte @@ -20,11 +20,16 @@ let defaultValues = {} $: job && getDefaultArgs() + let lastJobId: string | undefined = undefined async function getDefaultArgs() { let jobId = job.flow_status?.modules?.[approvalStep]?.job + if (jobId === lastJobId) { + return + } if (!jobId) { return {} } + lastJobId = jobId let job_result = await JobService.getCompletedJobResult({ workspace: workspaceId ?? $workspaceStore ?? '', id: jobId