From ead9c74d9ba06e4c93108abbc4e48c2287758841 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Mon, 21 Dec 2015 11:41:08 +0100 Subject: [PATCH] Fixed: Unlink module from policy on module update (ticket: 3090 // 2673) --- pandora_server/util/pandora_manage.pl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 8c5bfc6cd7..f88bbedde3 100644 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -2434,6 +2434,11 @@ sub cli_module_update() { my $update; $update->{$field} = $new_value; + + my $policy_id = enterprise_hook('get_id_policy_module_agent_module',[$dbh, safe_input($id_agent_module)]); + if ( $policy_id > 0) { + $update->{policy_linked} = 0; + } pandora_update_module_from_hash ($conf, $update, 'id_agente_modulo', $id_agent_module, $dbh); }