From 9e5fe175a0df66d1d1ca8a9255083c475fbcf83d Mon Sep 17 00:00:00 2001 From: m-lopez-f Date: Mon, 5 Dec 2016 10:06:29 +0100 Subject: [PATCH] Fixed problems with module group when not exicts. (cherry picked from commit 62028a0b474e2a0453bc42768e0b12e96a597410) --- pandora_server/lib/PandoraFMS/DataServer.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pandora_server/lib/PandoraFMS/DataServer.pm b/pandora_server/lib/PandoraFMS/DataServer.pm index 1be9492de1..cb65df9c94 100644 --- a/pandora_server/lib/PandoraFMS/DataServer.pm +++ b/pandora_server/lib/PandoraFMS/DataServer.pm @@ -667,7 +667,10 @@ sub process_module_data ($$$$$$$$$$) { # The group name has to be translated to a group ID if (defined $module_conf->{'module_group'}) { - $module_conf->{'id_module_group'} = get_module_group_id ($dbh, $module_conf->{'module_group'}); + my $id_group_module = get_module_group_id ($dbh, $module_conf->{'module_group'}); + if ( $id_group_module >= 0) { + $module_conf->{'id_module_group'} = $id_group_module; + } delete $module_conf->{'module_group'}; }