From 51027f6b305057c40595cf39af72d7286c10e856 Mon Sep 17 00:00:00 2001 From: Joshua <63589370+Final-Hawk@users.noreply.github.com> Date: Sun, 17 Jul 2022 19:16:33 +1000 Subject: [PATCH] Update SQL statement to correct one --- back/pialert.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/back/pialert.py b/back/pialert.py index 72d20ba8..b322a6f1 100644 --- a/back/pialert.py +++ b/back/pialert.py @@ -711,7 +711,7 @@ def print_scan_stats (): sql.execute("SELECT * FROM Devices") History_All = sql.fetchall() History_All_Devices = len(History_All) - sql.execute("SELECT * FROM Devices WHERE dev_PresentLastScan is True") + sql.execute("""SELECT * FROM CurrentScan WHERE cur_ScanCycle = ? """, (cycle,)) History_Online = sql.fetchall() History_Online_Devices = len(History_Online) History_Offline_Devices = History_All_Devices - History_Online_Devices