diff --git a/pandora_console/include/functions_api.php b/pandora_console/include/functions_api.php index de094fabad..853d6a9c24 100644 --- a/pandora_console/include/functions_api.php +++ b/pandora_console/include/functions_api.php @@ -2121,9 +2121,9 @@ function api_get_all_agents($thrash1, $thrash2, $other, $returnType) } $ag_groups = implode(',', (array) $ag_groups); - } - $where .= ' AND (id_grupo IN ('.$ag_groups.') OR id_group IN ('.$ag_groups.'))'; + $where .= ' AND (id_grupo IN ('.$ag_groups.') OR id_group IN ('.$ag_groups.'))'; + } } if (isset($other['data'][3])) {