(plugin) notification::microsoft::office365::teams - fix uninitialized value (#4146)

This commit is contained in:
qgarnier 2023-01-16 14:50:47 +00:00 committed by Kevin Duret
parent ec9ef04f73
commit aa443baf7d
1 changed files with 5 additions and 1 deletions

View File

@ -140,7 +140,11 @@ sub build_resource_status_filters {
"name" => "search",
"object_type" => undef,
"type" => "text",
"value"=> "s.description:$self->{option_results}->{service_name} h.name:$self->{option_results}->{host_name}"
"value" => sprintf(
's.description:%s h.name:%s',
defined($self->{option_results}->{service_name}) ? $self->{option_results}->{service_name} : '',
defined($self->{option_results}->{host_name}) ? $self->{option_results}->{host_name} : ''
)
},
{
"name" => "sort",