fix: fix approval steps handling of default args

This commit is contained in:
Ruben Fiszel
2024-03-26 22:15:57 +01:00
parent dd6d0950ed
commit 2bcd3cb8e8
2 changed files with 6 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
{"started":true,"success":true,"completed":true,"result":""}
@@ -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