Skip to content

Commit 1c2e2a7

Browse files
authored
Handle case where user sets detections as empty list (#11646)
1 parent a763ae3 commit 1c2e2a7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

frigate/review/maintainer.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ def check_if_new_segment(
356356
if (
357357
not severity
358358
and (
359-
not camera_config.review.detections.labels
359+
camera_config.review.detections.labels is None
360360
or object["label"] in (camera_config.review.detections.labels)
361361
)
362362
and (
@@ -467,7 +467,7 @@ def run(self) -> None:
467467
current_segment.audio.add(audio)
468468
current_segment.severity = SeverityEnum.alert
469469
elif (
470-
not camera_config.review.detections.labels
470+
camera_config.review.detections.labels is None
471471
or audio in camera_config.review.detections.labels
472472
):
473473
current_segment.audio.add(audio)
@@ -510,7 +510,7 @@ def run(self) -> None:
510510
detections.add(audio)
511511
severity = SeverityEnum.alert
512512
elif (
513-
not camera_config.review.detections.labels
513+
camera_config.review.detections.labels is None
514514
or audio in camera_config.review.detections.labels
515515
):
516516
detections.add(audio)
@@ -571,7 +571,7 @@ def get_active_objects(
571571
and (
572572
o["label"] in camera_config.review.alerts.labels
573573
or (
574-
not camera_config.review.detections.labels
574+
camera_config.review.detections.labels is None
575575
or o["label"] in camera_config.review.detections.labels
576576
)
577577
) # object must be in the alerts or detections label list

0 commit comments

Comments
 (0)