From 24301cbdbc9ccce757386111bd3a337e0e63b3d2 Mon Sep 17 00:00:00 2001 From: jokob-sk Date: Wed, 23 Sep 2026 07:52:30 +1000 Subject: [PATCH] BE: FREEBOX dual stack IP fix #1804 --- server/plugins/freebox/freebox.py | 4 ++-- test/scan/test_ip_format_and_locking.py | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/server/plugins/freebox/freebox.py b/server/plugins/freebox/freebox.py index 9a8ad2ec..89bd9fbd 100755 --- a/server/plugins/freebox/freebox.py +++ b/server/plugins/freebox/freebox.py @@ -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, ) diff --git a/test/scan/test_ip_format_and_locking.py b/test/scan/test_ip_format_and_locking.py index 08693373..435b0fda 100644 --- a/test/scan/test_ip_format_and_locking.py +++ b/test/scan/test_ip_format_and_locking.py @@ -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, "") -