From c6cb753e25e86d47a8df56c00359bbd136457d2a Mon Sep 17 00:00:00 2001 From: frederik Date: Sun, 17 Aug 2025 18:30:39 +0200 Subject: [PATCH] fix: remove un-needed removal of quote characters, we handle them fine nowadays --- scripts/utils/notifications.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/utils/notifications.py b/scripts/utils/notifications.py index e0c79b7..a12e819 100644 --- a/scripts/utils/notifications.py +++ b/scripts/utils/notifications.py @@ -138,7 +138,7 @@ def sendAppriseNotifications(species, confidence, confidencepct, path, today = datetime.now().strftime("%Y-%m-%d") cur.execute(f"SELECT DISTINCT(Com_Name), COUNT(Com_Name) FROM detections WHERE Date = DATE('{today}') GROUP BY Com_Name") known_species = cur.fetchall() - detections = [d[1] for d in known_species if d[0] == comName.replace("'", "")] + detections = [d[1] for d in known_species if d[0] == comName] numberDetections = 0 if len(detections): numberDetections = detections[0] @@ -161,7 +161,7 @@ def sendAppriseNotifications(species, confidence, confidencepct, path, today = datetime.now().strftime("%Y-%m-%d") cur.execute(f"SELECT DISTINCT(Com_Name), COUNT(Com_Name) FROM detections WHERE Date >= DATE('{today}', '-7 day') GROUP BY Com_Name") known_species = cur.fetchall() - detections = [d[1] for d in known_species if d[0] == comName.replace("'", "")] + detections = [d[1] for d in known_species if d[0] == comName] numberDetections = 0 if len(detections): numberDetections = detections[0]