fix: fix delete job

This commit is contained in:
Ruben Fiszel
2024-08-03 08:26:29 +02:00
parent 04df0ae831
commit eb32cecda9
2 changed files with 7 additions and 5 deletions

View File

@@ -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)

View File

@@ -691,10 +691,12 @@
</div>
</h1>
{#if job?.['deleted']}
<Alert type="error" title="Deleted">
The content of this run was deleted (by an admin, no less)
</Alert>
<div class="my-2" />
<div class="max-w-7xl mx-auto w-full px-4">
<Alert type="error" title="Deleted">
The content of this run was deleted (by an admin, no less)
</Alert>
</div>
<div class="my-4" />
{/if}
<!-- Arguments and actions -->