diff --git a/centreon-plugins/apps/pvx/restapi/custom/api.pm b/centreon-plugins/apps/pvx/restapi/custom/api.pm index 1526af727..4e3a0b3bc 100644 --- a/centreon-plugins/apps/pvx/restapi/custom/api.pm +++ b/centreon-plugins/apps/pvx/restapi/custom/api.pm @@ -169,8 +169,10 @@ sub query_range { if (defined( $self->{option_results}->{default_value} ) && $options{filter} ne '' && !exists( $result->{data} )) { $options{filter} =~ /([^\s\\]+) = \"([^\s\\]+)\"/; - push @{$result->{data}->{key}}, { value => $2 }; - push @{$result->{data}->{values}}, { value => $self->{option_results}->{default_value} }; + $result->{data} = [ + { key => [ { value => $2 } ] }, + { values => [ { value => $self->{option_results}->{default_value} } ] } + ]; } return $result->{data};