diff --git a/apps/mulesoft/restapi/mode/messages.pm b/apps/mulesoft/restapi/mode/messages.pm index 91be01b5f..a3b339983 100644 --- a/apps/mulesoft/restapi/mode/messages.pm +++ b/apps/mulesoft/restapi/mode/messages.pm @@ -147,9 +147,11 @@ sub manage_selection { push @{$self->{raw_results}->{$queue->{queueId}}->{$message_type}}, $values->{value}; $total_value += $values->{value}; } - my $points = scalar(@{$self->{raw_results}->{$queue->{queueId}}->{$message_type}}); + if ($self->{raw_results}->{$queue->{queueId}}->{$message_type}) { + my $points = scalar(@{$self->{raw_results}->{$queue->{queueId}}->{$message_type}}); - $self->{raw_results}->{$queue->{queueId}}{$message_type} = $total_value / $points; + $self->{raw_results}->{$queue->{queueId}}{$message_type} = $total_value / $points; + } } $self->{queues}->{$queue->{queueId}} = {