From 3d71253abdb0dff1670a796d07a53ecd0a98414e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=5FTeixeira=5F1998?= <47570249+AndreTeixeira1998@users.noreply.github.com> Date: Mon, 11 Sep 2023 21:16:20 +0100 Subject: [PATCH] fix #2257 TIME convertion in pg_executor.rs (#2267) --- backend/windmill-worker/src/pg_executor.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/windmill-worker/src/pg_executor.rs b/backend/windmill-worker/src/pg_executor.rs index b34c027256..08d0f02380 100644 --- a/backend/windmill-worker/src/pg_executor.rs +++ b/backend/windmill-worker/src/pg_executor.rs @@ -218,15 +218,15 @@ pub fn pg_cell_to_json_value( Type::DATE => get_basic(row, column, column_i, |a: chrono::NaiveDate| { Ok(JSONValue::String(a.to_string())) })?, + Type::TIME => get_basic(row, column, column_i, |a: chrono::NaiveTime| { + Ok(JSONValue::String(a.to_string())) + })?, Type::TIMESTAMPTZ => get_basic(row, column, column_i, |a: chrono::DateTime| { Ok(JSONValue::String(a.to_string())) })?, Type::UUID => get_basic(row, column, column_i, |a: uuid::Uuid| { Ok(JSONValue::String(a.to_string())) })?, - // Type::DATE => get_basic(row, column, column_i, |a: chrono::NaiveDate| { - // Ok(JSONValue::String(a.to_string())) - // })?, Type::JSON | Type::JSONB => get_basic(row, column, column_i, |a: JSONValue| Ok(a))?, Type::FLOAT4 => get_basic(row, column, column_i, |a: f32| { Ok(f64_to_json_number(a.into())?)