fix: remove un-needed removal of quote characters, we handle them fine nowadays
This commit is contained in:
@@ -138,7 +138,7 @@ def sendAppriseNotifications(species, confidence, confidencepct, path,
|
|||||||
today = datetime.now().strftime("%Y-%m-%d")
|
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")
|
cur.execute(f"SELECT DISTINCT(Com_Name), COUNT(Com_Name) FROM detections WHERE Date = DATE('{today}') GROUP BY Com_Name")
|
||||||
known_species = cur.fetchall()
|
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
|
numberDetections = 0
|
||||||
if len(detections):
|
if len(detections):
|
||||||
numberDetections = detections[0]
|
numberDetections = detections[0]
|
||||||
@@ -161,7 +161,7 @@ def sendAppriseNotifications(species, confidence, confidencepct, path,
|
|||||||
today = datetime.now().strftime("%Y-%m-%d")
|
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")
|
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()
|
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
|
numberDetections = 0
|
||||||
if len(detections):
|
if len(detections):
|
||||||
numberDetections = detections[0]
|
numberDetections = detections[0]
|
||||||
|
|||||||
Reference in New Issue
Block a user