From 61b9e01b52978d28e4f5708eb5e997f5a72d4948 Mon Sep 17 00:00:00 2001 From: Ambroise Date: Sat, 1 Jul 2023 10:32:57 +0200 Subject: [PATCH] Fix an error when the log string is empty (#1058) --- lib/App/Netdisco/JobQueue/PostgreSQL.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/App/Netdisco/JobQueue/PostgreSQL.pm b/lib/App/Netdisco/JobQueue/PostgreSQL.pm index 5da0dd88..e89b8eb2 100644 --- a/lib/App/Netdisco/JobQueue/PostgreSQL.pm +++ b/lib/App/Netdisco/JobQueue/PostgreSQL.pm @@ -279,7 +279,7 @@ sub jq_complete { ->search({ job => $job->id }, { for => 'update' }) ->update({ status => $job->status, - log => $job->log, + log => (ref($job->log) eq ref('')) ? $job->log : '', started => $job->started, finished => $job->finished, (($job->action eq 'hook') ? (subaction => $job->subaction) : ()),