13296-Fix next button with same name in Alerts->Templates

This commit is contained in:
Pablo Aragon 2024-04-03 15:08:06 +02:00
parent 6ccdc8c4d3
commit a23978e541
1 changed files with 2 additions and 1 deletions

View File

@ -350,7 +350,8 @@ function update_template($step)
'previous_name' => $previous_name,
];
if ($name_check === false) {
$original_name = db_get_value('name', 'talert_templates', 'id', $id);
if ($name_check === false || $original_name === $name_check) {
$result = alerts_update_alert_template($id, $values);
} else {
ui_print_warning_message(__('Another template with the same name already exists'));