From 1c2e2a7b38b071e478d908986f5c2fd15949fb5e Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Thu, 30 May 2024 06:45:34 -0600 Subject: [PATCH] Handle case where user sets detections as empty list (#11646) --- frigate/review/maintainer.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frigate/review/maintainer.py b/frigate/review/maintainer.py index 2d95c082e..32d4628a7 100644 --- a/frigate/review/maintainer.py +++ b/frigate/review/maintainer.py @@ -356,7 +356,7 @@ class ReviewSegmentMaintainer(threading.Thread): if ( not severity and ( - not camera_config.review.detections.labels + camera_config.review.detections.labels is None or object["label"] in (camera_config.review.detections.labels) ) and ( @@ -467,7 +467,7 @@ class ReviewSegmentMaintainer(threading.Thread): current_segment.audio.add(audio) current_segment.severity = SeverityEnum.alert elif ( - not camera_config.review.detections.labels + camera_config.review.detections.labels is None or audio in camera_config.review.detections.labels ): current_segment.audio.add(audio) @@ -510,7 +510,7 @@ class ReviewSegmentMaintainer(threading.Thread): detections.add(audio) severity = SeverityEnum.alert elif ( - not camera_config.review.detections.labels + camera_config.review.detections.labels is None or audio in camera_config.review.detections.labels ): detections.add(audio) @@ -571,7 +571,7 @@ def get_active_objects( and ( o["label"] in camera_config.review.alerts.labels or ( - not camera_config.review.detections.labels + camera_config.review.detections.labels is None or o["label"] in camera_config.review.detections.labels ) ) # object must be in the alerts or detections label list