diff --git a/backend/windmill-common/src/flows.rs b/backend/windmill-common/src/flows.rs index 3b0cd1d5b3..574f9be0e6 100644 --- a/backend/windmill-common/src/flows.rs +++ b/backend/windmill-common/src/flows.rs @@ -12,7 +12,6 @@ use std::{ }; use serde::{self, Deserialize, Serialize, Serializer}; -use serde_json::value::RawValue; use crate::{ more_serde::{ @@ -176,7 +175,7 @@ pub struct Suspend { pub struct Mock { pub enabled: bool, #[serde(skip_serializing_if = "Option::is_none")] - pub return_value: Option>, + pub return_value: Option, } #[derive(Deserialize, Serialize, Debug, Clone)] diff --git a/backend/windmill-worker/src/worker_flow.rs b/backend/windmill-worker/src/worker_flow.rs index 79e4658d15..2eee08e3f3 100644 --- a/backend/windmill-worker/src/worker_flow.rs +++ b/backend/windmill-worker/src/worker_flow.rs @@ -1448,13 +1448,15 @@ async fn push_next_flow_job let mut hm = HashMap::new(); hm.insert( "previous_result".to_string(), - module - .mock - .as_ref() - .unwrap() - .return_value - .clone() - .unwrap_or_else(|| serde_json::from_str("null").unwrap()), + to_raw_value( + &module + .mock + .as_ref() + .unwrap() + .return_value + .clone() + .unwrap_or_else(|| serde_json::from_str("null").unwrap()), + ), ); Ok(hm) } else if let Some(id) = get_args_from_id {