fix group alert report

This commit is contained in:
fbsanchez 2020-10-29 17:53:34 +01:00
parent 495decdf5f
commit 26e809dc37
1 changed files with 2 additions and 11 deletions

View File

@ -2871,17 +2871,8 @@ function alerts_get_agent_modules(
);
$agent_modules = db_get_all_rows_sql($sql);
} else {
$groups = groups_get_children($id_grupo, true);
if (empty($groups) === false) {
$groups = array_reduce(
$groups,
function ($carry, $item) {
$carry[] = $item['id_grupo'];
return $carry;
},
[$id_grupo]
);
$groups = groups_get_children_ids($id_grupo, true);
if (count($groups) > 1) {
$sql = sprintf(
'SELECT distinct(atm.id_agent_module)
FROM talert_template_modules atm