fix: remove un-needed removal of quote characters, we handle them fine nowadays

This commit is contained in:
frederik
2025-08-17 18:30:39 +02:00
parent e34e375c3b
commit c6cb753e25
+2 -2
View File
@@ -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]