mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2026-09-24 23:05:15 -04:00
BE: FREEBOX dual stack IP fix #1804
This commit is contained in:
1 parent
a573eeb0e7
commit
24301cbdbc
2 files changed
+2
-3
No files matched your search
@@ -4,7 +4,7 @@ import os
|
||||
import sys
|
||||
from pytz import timezone
|
||||
import asyncio
|
||||
from datetime import datetime, timezone
|
||||
from datetime import datetime, timezone as dt_timezone
|
||||
from pathlib import Path
|
||||
from typing import cast
|
||||
import socket
|
||||
@@ -170,7 +170,7 @@ def main():
|
||||
watched1=host.get("primary_name", "(unknown)"),
|
||||
watched2=host.get("vendor_name", "(unknown)"),
|
||||
watched3=map_device_type(host.get("host_type", "")),
|
||||
watched4=datetime.fromtimestamp(ip.get("last_time_reachable", 0), tz=timezone.utc).strftime(DATETIME_PATTERN),
|
||||
watched4=datetime.fromtimestamp(ip.get("last_time_reachable", 0), tz=dt_timezone.utc).strftime(DATETIME_PATTERN),
|
||||
extra="",
|
||||
foreignKey=mac,
|
||||
)
|
||||
|
||||
@@ -261,4 +261,3 @@ def test_dual_stack_presence_suppressed_row_excluded(scan_db, mock_ip_handlers):
|
||||
).fetchone()
|
||||
assert row["devPrimaryIPv4"] == "192.168.1.70"
|
||||
assert row["devPrimaryIPv6"] in (None, "")
|
||||
|
||||
Reference in new issue
Block a user