From 8793e2debd772e3d4cec67cbbe90fdefbf009c84 Mon Sep 17 00:00:00 2001 From: Alejandro Gallardo Escobar Date: Wed, 12 Jun 2019 09:16:47 +0200 Subject: [PATCH] Fixed the omnipresent group summary bug --- .../include/rest-api/models/VisualConsole/Container.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/rest-api/models/VisualConsole/Container.php b/pandora_console/include/rest-api/models/VisualConsole/Container.php index ad1f34a2ff..91c650c404 100644 --- a/pandora_console/include/rest-api/models/VisualConsole/Container.php +++ b/pandora_console/include/rest-api/models/VisualConsole/Container.php @@ -319,7 +319,7 @@ final class Container extends Model // Default filter. $filter = ['id_layout' => $layoutId]; $fields = [ - 'id', + 'DISTINCT(id) AS id', 'type', 'cache_expiration', 'id_layout', @@ -340,8 +340,9 @@ final class Container extends Model // Only true condition if type is GROUP_ITEM. $filter[] = '('.\db_format_array_where_clause_sql( [ - 'type' => GROUP_ITEM, - 'id_group' => $groupsFilter, + 'id_layout' => $layoutId, + 'type' => GROUP_ITEM, + 'id_group' => $groupsFilter, ] ).')'; }