mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
Handle case where user sets detections as empty list (#11646)
This commit is contained in:
parent
a763ae303d
commit
1c2e2a7b38
@ -356,7 +356,7 @@ class ReviewSegmentMaintainer(threading.Thread):
|
|||||||
if (
|
if (
|
||||||
not severity
|
not severity
|
||||||
and (
|
and (
|
||||||
not camera_config.review.detections.labels
|
camera_config.review.detections.labels is None
|
||||||
or object["label"] in (camera_config.review.detections.labels)
|
or object["label"] in (camera_config.review.detections.labels)
|
||||||
)
|
)
|
||||||
and (
|
and (
|
||||||
@ -467,7 +467,7 @@ class ReviewSegmentMaintainer(threading.Thread):
|
|||||||
current_segment.audio.add(audio)
|
current_segment.audio.add(audio)
|
||||||
current_segment.severity = SeverityEnum.alert
|
current_segment.severity = SeverityEnum.alert
|
||||||
elif (
|
elif (
|
||||||
not camera_config.review.detections.labels
|
camera_config.review.detections.labels is None
|
||||||
or audio in camera_config.review.detections.labels
|
or audio in camera_config.review.detections.labels
|
||||||
):
|
):
|
||||||
current_segment.audio.add(audio)
|
current_segment.audio.add(audio)
|
||||||
@ -510,7 +510,7 @@ class ReviewSegmentMaintainer(threading.Thread):
|
|||||||
detections.add(audio)
|
detections.add(audio)
|
||||||
severity = SeverityEnum.alert
|
severity = SeverityEnum.alert
|
||||||
elif (
|
elif (
|
||||||
not camera_config.review.detections.labels
|
camera_config.review.detections.labels is None
|
||||||
or audio in camera_config.review.detections.labels
|
or audio in camera_config.review.detections.labels
|
||||||
):
|
):
|
||||||
detections.add(audio)
|
detections.add(audio)
|
||||||
@ -571,7 +571,7 @@ def get_active_objects(
|
|||||||
and (
|
and (
|
||||||
o["label"] in camera_config.review.alerts.labels
|
o["label"] in camera_config.review.alerts.labels
|
||||||
or (
|
or (
|
||||||
not camera_config.review.detections.labels
|
camera_config.review.detections.labels is None
|
||||||
or o["label"] in camera_config.review.detections.labels
|
or o["label"] in camera_config.review.detections.labels
|
||||||
)
|
)
|
||||||
) # object must be in the alerts or detections label list
|
) # object must be in the alerts or detections label list
|
||||||
|
Loading…
Reference in New Issue
Block a user