From ad69c082284449bf8cde17bdaddcd85249338100 Mon Sep 17 00:00:00 2001 From: pyranota <92104930+pyranota@users.noreply.github.com> Date: Tue, 24 Sep 2024 08:24:26 +0000 Subject: [PATCH] fix `get_job_update` returning error (#4427) When get_progress specified to true, but there is no record of progress for given job Endpoint will fail and return error. Nothing cricial but should be fixed. --- backend/windmill-api/src/jobs.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/windmill-api/src/jobs.rs b/backend/windmill-api/src/jobs.rs index 27aa81b2ba..21b4ee16db 100644 --- a/backend/windmill-api/src/jobs.rs +++ b/backend/windmill-api/src/jobs.rs @@ -4663,8 +4663,8 @@ async fn get_job_update( "progress_perc" ) - .fetch_one(&db) - .await? + .fetch_optional(&db) + .await?.and_then(|inner| inner) } else { None };