From aef3e8affdea39fa3d744d440a1343139bb29f71 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Mon, 20 Sep 2021 17:51:56 +0200 Subject: [PATCH] #8013 Fixed percentile --- .../rest-api/models/VisualConsole/Items/Percentile.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pandora_console/include/rest-api/models/VisualConsole/Items/Percentile.php b/pandora_console/include/rest-api/models/VisualConsole/Items/Percentile.php index 11132b7341..e04db7d7c3 100644 --- a/pandora_console/include/rest-api/models/VisualConsole/Items/Percentile.php +++ b/pandora_console/include/rest-api/models/VisualConsole/Items/Percentile.php @@ -379,6 +379,11 @@ final class Percentile extends Item $moduleValue = \modules_get_last_value($moduleId); if ($moduleValue === false) { + // Restore connection. + if ($nodeConnected === true) { + \metaconsole_restore_db(); + } + throw new \InvalidArgumentException( 'error fetching the module value' );