From 663d5da1d37d5bed6fb86a1248237314b1f2f78e Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Thu, 20 Jul 2023 12:56:48 +0100 Subject: [PATCH] #1062 allow job submit API to use extra field instead of subaction --- 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 f679b68b..d0c0626a 100644 --- a/lib/App/Netdisco/JobQueue/PostgreSQL.pm +++ b/lib/App/Netdisco/JobQueue/PostgreSQL.pm @@ -357,7 +357,7 @@ sub jq_insert { die 'failed to find row for custom field update' unless $row; $spec->{action} =~ s/^cf_//; - $spec->{subaction} = to_json( $spec->{subaction} ); + $spec->{subaction} = to_json( $spec->{extra} || $spec->{subaction} ); $row->make_column_dirty('custom_fields'); $row->update({ custom_fields => \['jsonb_set(custom_fields, ?, ?)'