From 49b9fb854bbeea8a8195f64b6841f0026621145a Mon Sep 17 00:00:00 2001 From: maziggy Date: Sat, 27 Dec 2025 18:48:14 +0100 Subject: [PATCH] - Fixed bug in notification module where notifictions were sent although printer is offline --- backend/app/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/app/main.py b/backend/app/main.py index 0550ec7f3..4ff2d3db6 100644 --- a/backend/app/main.py +++ b/backend/app/main.py @@ -1279,8 +1279,8 @@ async def record_ams_history(): for printer in printers: # Get current state from printer manager state = printer_manager.get_status(printer.id) - if not state or not state.raw_data: - continue + if not state or not state.connected or not state.raw_data: + continue # Skip disconnected printers - don't use stale data raw_data = state.raw_data if "ams" not in raw_data or not isinstance(raw_data["ams"], list):