diff --git a/backend/src/worker_flow.rs b/backend/src/worker_flow.rs index 78a9cdf9b6..a398e8246c 100644 --- a/backend/src/worker_flow.rs +++ b/backend/src/worker_flow.rs @@ -478,10 +478,7 @@ async fn push_next_flow_job( serde_json::Value::Number(serde_json::Number::from(0)), ); iteration_map.insert("value".to_string(), itered[0].clone()); - args.insert( - "iteration".to_string(), - serde_json::Value::Object(iteration_map), - ); + args.insert("iter".to_string(), serde_json::Value::Object(iteration_map)); match itered { serde_json::Value::Array(arr) => (Some(args), Some((0 as u8, arr, vec![]))), a @ _ => Err(Error::BadRequest(format!( @@ -506,10 +503,7 @@ async fn push_next_flow_job( "value".to_string(), itered[nindex.to_owned() as usize].clone(), ); - args.insert( - "iteration".to_string(), - serde_json::Value::Object(iteration_map), - ); + args.insert("iter".to_string(), serde_json::Value::Object(iteration_map)); ( Some(args), Some((nindex, itered.clone(), forloop_jobs.clone())), diff --git a/frontend/src/lib/script_helpers.ts b/frontend/src/lib/script_helpers.ts index 7c91fd8312..d56978fbfe 100644 --- a/frontend/src/lib/script_helpers.ts +++ b/frontend/src/lib/script_helpers.ts @@ -1,16 +1,13 @@ export const PYTHON_INIT_CODE = `import os import wmill from datetime import datetime -# Our webeditor includes a syntax, type checker through a language server running pyright -# and the autoformatter Black in our servers. Use Cmd/Ctrl + S to autoformat the code. -# Beware that the code is only saved when you click Save and not across reload. -# You can however navigate to any steps safely. + """ +Use Cmd/Ctrl + S to autoformat the code. The client is used to interact with windmill itself through its standard API. -One can explore the methods available through autocompletion of \`client.XXX\`. -Only the most common methods are included for ease of use. Request more as -feedback if you feel you are missing important ones. +One can explore the methods available through autocompletion of \`wmill.XXX\`. """ + def main(name: str = "Nicolas Bourbaki", age: int = 42, obj: dict = {"even": "dicts"},