Merge branch 'ent-8818-Errores-SQL-al-crear-alertas-en-Bulk-operations' into 'develop'

fixed sql error

See merge request artica/pandorafms!4820
This commit is contained in:
Daniel Rodriguez 2022-04-19 12:19:23 +00:00
commit 627e9bb22a
1 changed files with 7 additions and 1 deletions

View File

@ -1159,7 +1159,13 @@ function alerts_create_alert_agent_module($id_agent_module, $id_alert_template,
$values['id_alert_template'] = (int) $id_alert_template;
$values['last_reference'] = time();
return @db_process_sql_insert('talert_template_modules', $values);
$sql = sprintf(
'INSERT IGNORE INTO talert_template_modules(%s) VALUES(%s)',
implode(', ', array_keys($values)),
implode(', ', array_values($values))
);
return @db_process_sql($sql);
}