Fixed error in cli

This commit is contained in:
m-lopez-f 2016-10-27 15:25:01 +02:00
parent 35def77548
commit aebf32bbd1
1 changed files with 2 additions and 0 deletions

View File

@ -1219,10 +1219,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";
}