Fix columns type conversion for flow alerts view

This commit is contained in:
Alfredo Cardigliano 2022-05-09 18:42:03 +02:00
parent 8651e089a1
commit 103ffcf370
2 changed files with 20 additions and 0 deletions

View file

@ -101,7 +101,11 @@ function alert_store:delete()
if ntop.isClickHouseEnabled() then
local table_name = self._table_name
if self._write_table_name then
-- TODO do not delete the entry, use a flag in case of a view
table_name = self._write_table_name
-- Fix column type conversion
where_clause = historical_flow_utils.fixWhereTypes(where_clause)
end
q = string.format("ALTER TABLE `%s` DELETE WHERE %s ", table_name, where_clause)