Merge branch '2927-Error-en-vista-de-alertas-lanzadas' into 'develop'

Fixed bug in alert details

See merge request artica/pandorafms!1887
This commit is contained in:
vgilc 2018-11-30 13:07:41 +01:00
commit b97a9e2989
1 changed files with 3 additions and 3 deletions

View File

@ -1845,9 +1845,9 @@ function get_group_alerts($id_group, $filter = '', $options = false,
}
}
$selectText = 'talert_template_modules.*, t2.nombre AS agent_module_name, t3.alias AS agent_name, t4.name AS template_name';
$selectText = 'DISTINCT talert_template_modules.*, t2.nombre AS agent_module_name, t3.alias AS agent_name, t4.name AS template_name';
if ($count !== false) {
$selectText = 'COUNT(talert_template_modules.id) AS count';
$selectText = 'COUNT(DISTINCT talert_template_modules.id) AS count';
}
$sql = sprintf ("SELECT %s
@ -1871,7 +1871,7 @@ function get_group_alerts($id_group, $filter = '', $options = false,
return $alerts[0]['count'];
}
else {
return $alerts;
return $alerts;
}
}