Merge branch 'ent-10006-cli-problema-con-forzar-crear-agente-en-create_event' into 'develop'
Ent-10006 CLI problema con forzar crear agente en create_event See merge request artica/pandorafms!5978
This commit is contained in:
commit
3e64ad97a9
|
@ -4453,15 +4453,8 @@ sub cli_create_event() {
|
|||
exist_check($id_user,'user',$user_name);
|
||||
}
|
||||
|
||||
my $id_group;
|
||||
|
||||
if (! $group_name || $group_name eq "All") {
|
||||
$id_group = 0;
|
||||
}
|
||||
else {
|
||||
$id_group = get_group_id($dbh,$group_name);
|
||||
my $id_group = get_group_id($dbh,$group_name);
|
||||
exist_check($id_group,'group',$group_name);
|
||||
}
|
||||
|
||||
my $id_agent;
|
||||
|
||||
|
@ -4515,7 +4508,7 @@ sub cli_create_event() {
|
|||
# exist_check($id_agent,'agent',$agent_name);
|
||||
if($id_agent == -1){
|
||||
if($force_create_agent == 1){
|
||||
pandora_create_agent ($conf, '', $agent_name, '', '', '', '', 'Created by cli_create_event', '', $dbh);
|
||||
pandora_create_agent ($conf, '', $agent_name, '', $id_group, '', '', 'Created by cli_create_event', '', $dbh);
|
||||
print_log "[INFO] Adding agent '$agent_name' \n\n";
|
||||
$id_agent = get_agent_id($dbh,$agent_name);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue