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.
This commit is contained in:
pyranota
2024-09-24 08:24:26 +00:00
committed by GitHub
parent 4d5415dbd2
commit ad69c08228
+2 -2
View File
@@ -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
};