From e54dc3ff97e4454a15b9efe25cc12f6c9e1e176b Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Thu, 23 Feb 2023 08:57:58 +0100 Subject: [PATCH] fix(backend): workflow check for has_failure_module --- backend/windmill-worker/src/worker_flow.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/windmill-worker/src/worker_flow.rs b/backend/windmill-worker/src/worker_flow.rs index 9445452cc5..79d0f415ac 100644 --- a/backend/windmill-worker/src/worker_flow.rs +++ b/backend/windmill-worker/src/worker_flow.rs @@ -557,7 +557,7 @@ async fn has_failure_module<'c>( flow: Uuid, tx: &mut sqlx::Transaction<'c, sqlx::Postgres>, ) -> Result { - sqlx::query_scalar( + sqlx::query_scalar::<_, Option>( " SELECT raw_flow->'failure_module' != 'null'::jsonb FROM queue @@ -568,6 +568,7 @@ async fn has_failure_module<'c>( .fetch_one(tx) .await .map_err(|e| Error::InternalErr(format!("error during retrieval of has_failure_module: {e}"))) + .map(|v| v.unwrap_or(false)) } fn next_retry(retry: &Retry, status: &RetryStatus) -> Option<(u16, Duration)> {