diff --git a/pandora_console/godmode/agentes/planned_downtime.editor.php b/pandora_console/godmode/agentes/planned_downtime.editor.php index cdd5152bd0..fdb8de3b06 100644 --- a/pandora_console/godmode/agentes/planned_downtime.editor.php +++ b/pandora_console/godmode/agentes/planned_downtime.editor.php @@ -1423,9 +1423,19 @@ function insert_downtime_agent($id_downtime, $user_groups_ad) } else { // If is selected 'Any', get all the agents. if (count($agents) === 1 && (int) $agents[0] === -2) { - $agents = agents_get_agents( + $agents = db_get_all_rows_filter( + 'tagente', ['id_grupo' => $filter_group], - 'id_agent' + 'id_agente' + ); + + $agents = array_reduce( + $agents, + function ($carry, $item) { + $carry[] = $item['id_agente']; + + return $carry; + } ); }