From 533a94b09e460cb5c86708f1cdd594398694f97f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Gonz=C3=A1lez?= Date: Mon, 19 Jul 2021 14:34:48 +0200 Subject: [PATCH] Fixed issue with alert actions update --- pandora_console/include/functions_alerts.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/functions_alerts.php b/pandora_console/include/functions_alerts.php index 7bfb860479..febe923692 100644 --- a/pandora_console/include/functions_alerts.php +++ b/pandora_console/include/functions_alerts.php @@ -2825,8 +2825,9 @@ function alerts_ui_update_or_create_actions($update=true) $values['action_threshold'] = $action_threshold; $values['create_wu_integria'] = $create_wu_integria; - $name_check = db_get_value('name', 'talert_actions', 'name', $name); - if ($name_check) { + // If this alert has the same name, not valid. + $name_check = db_get_row('talert_actions', 'name', $name); + if (empty($name_check) === false && (int) $name_check['id'] !== (int) $id) { $result = ''; } else { if ($update) {