From 4aeed1ffc80a8cfc42a3ebcc72e15d33f8b65e36 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Thu, 10 Nov 2022 16:49:16 +0100 Subject: [PATCH] fix edit schedule --- backend/windmill-queue/src/schedule.rs | 6 +++--- frontend/src/routes/schedule/add.svelte | 1 + frontend/src/routes/schedules.svelte | 16 ++++++++-------- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/backend/windmill-queue/src/schedule.rs b/backend/windmill-queue/src/schedule.rs index 5edfe84ec9..f0acf6d72d 100644 --- a/backend/windmill-queue/src/schedule.rs +++ b/backend/windmill-queue/src/schedule.rs @@ -189,9 +189,8 @@ async fn check_flow_conflict<'c>( .unwrap_or(false); if exists_flow { return Err(error::Error::BadConfig(format!( - "If a schedule has the same path as or a flow, it must be its primary schedule \ - and hence can only trigger it. - However the provided path is: {script_path} and is_flow is: {is_flow}", + "The path is the same as a flow, it can only trigger that flow. + However the provided path is: {script_path} and is_flow is {is_flow}" ))); }; } @@ -267,6 +266,7 @@ pub async fn edit_schedule( ), ) .await?; + tx.commit().await?; Ok(path.to_string()) } diff --git a/frontend/src/routes/schedule/add.svelte b/frontend/src/routes/schedule/add.svelte index 28a37544dc..1b3a42dec4 100644 --- a/frontend/src/routes/schedule/add.svelte +++ b/frontend/src/routes/schedule/add.svelte @@ -66,6 +66,7 @@ workspace: $workspaceStore!, path: initialPath }) + enabled = s.enabled schedule = s.schedule script_path = s.script_path ?? '' args = s.args ?? {} diff --git a/frontend/src/routes/schedules.svelte b/frontend/src/routes/schedules.svelte index 346bcca388..7622378d3c 100644 --- a/frontend/src/routes/schedules.svelte +++ b/frontend/src/routes/schedules.svelte @@ -93,14 +93,14 @@ > - {script_path}{is_flow ? 'flow' : 'script'} - {schedule} +
{is_flow ? 'flow' : 'script'}{script_path}
+ {schedule}