Simplify if statement

This commit is contained in:
Nick Mowen 2023-06-25 20:40:07 -06:00
parent 23f1b51455
commit ba3c7f59e5

View File

@ -179,7 +179,7 @@ class AudioEventMaintainer(threading.Thread):
self.expire_detections()
def handle_detection(self, label: str, score: float) -> None:
if self.detections.get(label) is not None:
if self.detections.get(label):
self.detections[label][
"last_detection"
] = datetime.datetime.now().timestamp()