diff --git a/lib/App/Netdisco/JobQueue/PostgreSQL.pm b/lib/App/Netdisco/JobQueue/PostgreSQL.pm index 3cc0e22e..a4dcb52b 100644 --- a/lib/App/Netdisco/JobQueue/PostgreSQL.pm +++ b/lib/App/Netdisco/JobQueue/PostgreSQL.pm @@ -343,6 +343,7 @@ sub jq_insert { $row = schema(vars->{'tenant'})->resultset('Device') ->find($spec->{device}); } + undef $row unless $row->can($spec->{action}); die 'failed to find row for custom field update' unless $row; $spec->{action} =~ s/^cf_//;