Merge branch 'ent-7818-no-se-pueden-editar-acciones-alertas' into 'develop'

Fixed issue with alert actions update

Closes pandora_enterprise#7818

See merge request artica/pandorafms!4311
This commit is contained in:
Daniel Rodriguez 2021-07-19 16:28:10 +00:00
commit 5b94ab86df
1 changed files with 3 additions and 2 deletions

View File

@ -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) {