mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2026-03-31 07:12:23 -07:00
TEST: field locking test fixes 7
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
This commit is contained in:
@@ -89,6 +89,8 @@ def exclude_ignored_devices(db):
|
||||
# -------------------------------------------------------------------------------
|
||||
FIELD_SPECS = {
|
||||
|
||||
# ⚠ "priority" is unused currently ⚠
|
||||
|
||||
# ==========================================================
|
||||
# DEVICE NAME
|
||||
# ==========================================================
|
||||
@@ -361,13 +363,13 @@ def update_ipv4_ipv6(db):
|
||||
# We use COALESCE(?, Column) so that if the first arg is NULL,
|
||||
# it keeps the current value of the column.
|
||||
|
||||
mylog("none", f"[Update Devices] Updated records_to_update: {records_to_update}")
|
||||
# mylog("none", f"[Update Devices] Updated records_to_update: {records_to_update}")
|
||||
|
||||
sql.executemany(
|
||||
"""
|
||||
UPDATE Devices
|
||||
SET devPrimaryIPv4 = COALESCE(?, NULLIF(devPrimaryIPv4, '')),
|
||||
devPrimaryIPv6 = COALESCE(?, NULLIF(devPrimaryIPv6, ''))
|
||||
SET devPrimaryIPv4 = COALESCE(NULLIF(?, ''), devPrimaryIPv4),
|
||||
devPrimaryIPv6 = COALESCE(NULLIF(?, ''), devPrimaryIPv6)
|
||||
WHERE devMac = ?
|
||||
""",
|
||||
records_to_update,
|
||||
|
||||
Reference in New Issue
Block a user