From a4aaa7282b0686537da2f511f0101ad5785d8ea9 Mon Sep 17 00:00:00 2001 From: Jokob-sk Date: Sun, 1 Jan 2023 10:41:21 +1100 Subject: [PATCH] fix previous_IP 2 --- back/pialert.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/back/pialert.py b/back/pialert.py index 4599f484..1b43412d 100755 --- a/back/pialert.py +++ b/back/pialert.py @@ -825,8 +825,8 @@ def get_previous_internet_IP (): sql.execute ("SELECT dev_LastIP FROM Devices WHERE dev_MAC = 'Internet' ") result = sql.fetchone() - if len(result) > 0: - previous_IP = sql.fetchone()[0] + if len(result) > 0 and type(result) is not None: + previous_IP = result[0] closeDB()