Small change to asset_management

This commit is contained in:
Matteo Biscosi 2024-11-05 15:56:15 +01:00
parent a6c0628110
commit 22251351a6

View file

@ -93,14 +93,14 @@ function asset_management_utils.insert_mac(entry)
table_name,
entry["key"]
)
local update_host = string.format("ALTER TABLE `%s` UPDATE `last_seen` = %u WHERE `key` == '%s'",
local update_mac = string.format("ALTER TABLE `%s` UPDATE `last_seen` = %u WHERE `key` == '%s'",
table_name,
entry["last_seen"],
entry["key"]
entry["mac"]
)
--tprint(insert_mac)
interface.alert_store_query(insert_mac)
return interface.alert_store_query(update_host)
return interface.alert_store_query(update_mac)
else
local insert_mac = string.format(
"INSERT INTO %s " ..