From ba3c7f59e5dd90798099f461c0880adb0962e71f Mon Sep 17 00:00:00 2001 From: Nick Mowen Date: Sun, 25 Jun 2023 20:40:07 -0600 Subject: [PATCH] Simplify if statement --- frigate/events/audio.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frigate/events/audio.py b/frigate/events/audio.py index 0e877ad7b..68491b8a6 100644 --- a/frigate/events/audio.py +++ b/frigate/events/audio.py @@ -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()