mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-26 23:24:27 +02:00
(plugin) apps::pvx::restapi - fix bugs when default-value option is used
This commit is contained in:
parent
760205dbad
commit
2c4b9bd8fa
@ -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};
|
||||
|
Loading…
x
Reference in New Issue
Block a user