From eb32cecda9480db5ae341f66c8a054022489e259 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Sat, 3 Aug 2024 08:26:29 +0200 Subject: [PATCH] fix: fix delete job --- backend/windmill-api/src/jobs.rs | 2 +- .../routes/(root)/(logged)/run/[...run]/+page.svelte | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/backend/windmill-api/src/jobs.rs b/backend/windmill-api/src/jobs.rs index b00ce8a834..622a1bb0ad 100644 --- a/backend/windmill-api/src/jobs.rs +++ b/backend/windmill-api/src/jobs.rs @@ -5003,7 +5003,7 @@ async fn delete_completed_job<'a>( require_admin(authed.is_admin, &authed.username)?; let job_o = sqlx::query_as::<_, CompletedJob>( "UPDATE completed_job SET args = null, logs = '', result = null, deleted = true WHERE id = $1 AND workspace_id = $2 \ - RETURNING *", + RETURNING *, null as labels", ) .bind(id) .bind(&w_id) diff --git a/frontend/src/routes/(root)/(logged)/run/[...run]/+page.svelte b/frontend/src/routes/(root)/(logged)/run/[...run]/+page.svelte index 4d47924bcd..ffa166a184 100644 --- a/frontend/src/routes/(root)/(logged)/run/[...run]/+page.svelte +++ b/frontend/src/routes/(root)/(logged)/run/[...run]/+page.svelte @@ -691,10 +691,12 @@ {#if job?.['deleted']} - - The content of this run was deleted (by an admin, no less) - -
+
+ + The content of this run was deleted (by an admin, no less) + +
+
{/if}