From f85253c5b7d4a33306754e6249d31f770ae1b74b Mon Sep 17 00:00:00 2001 From: m-lopez-f Date: Thu, 27 Oct 2016 15:25:01 +0200 Subject: [PATCH] Fixed error in cli (cherry picked from commit aebf32bbd1768e1c5d73cc0c7e41a233636add68) --- pandora_server/util/pandora_manage.pl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 7dd09bc381..f60a63cab7 100644 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -1239,10 +1239,12 @@ sub cli_create_data_module($) { } if ($in_policy == 0) { + my $module_exists = get_agent_module_id($dbh, $module_name_def, $agent_id); non_exist_check($module_exists, 'module name', $module_name_def); print_log "[INFO] Adding module '$module_name' to agent '$agent_name'\n\n"; } else { + my $policy_module_exist = enterprise_hook('get_policy_module_id',[$dbh, $policy_id, $module_name_def]); non_exist_check($policy_module_exist,'policy module',$module_name_def); print_log "[INFO] Adding module '$module_name' to policy '$policy_name'\n\n"; }