Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle case where user sets detections as empty list #11646

Merged
merged 1 commit into from
May 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions frigate/review/maintainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ def check_if_new_segment(
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 (
Expand Down Expand Up @@ -467,7 +467,7 @@ def run(self) -> None:
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)
Expand Down Expand Up @@ -510,7 +510,7 @@ def run(self) -> None:
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)
Expand Down Expand Up @@ -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
Expand Down
Loading