From ae562e5a7c80fe5087ad861205084ce112c4fe7f Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Thu, 8 Jul 2021 21:06:38 +0200 Subject: [PATCH] Use node db directly to handle policy_agents --- pandora_console/include/functions_api.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/functions_api.php b/pandora_console/include/functions_api.php index 05cb091487..f438a4f3c3 100644 --- a/pandora_console/include/functions_api.php +++ b/pandora_console/include/functions_api.php @@ -17283,7 +17283,7 @@ function remove_agent_from_policy($id_policy, $use_agent_name, $params) $agent = db_get_row_filter('tmetaconsole_agent', ['id_tagente' => $id_agent, 'id_tmetaconsole_setup' => $id_node]); } - $policy = policies_get_policy($id_policy, false, false); + $policy = policies_get_policy($id_policy); $policy_agent = (is_metaconsole()) ? db_get_row_filter('tpolicy_agents', ['id_policy' => $id_policy, 'id_agent' => $id_agent, 'id_node' => $id_node]) : db_get_row_filter('tpolicy_agents', ['id_policy' => $id_policy, 'id_agent' => $id_agent]);