Skip to content

NVR with realtime local object detection for IP cameras

fix: operator precedence makes detection type check always true (#22471)

ryzendigof658dbb15855
diff --git a/frigate/record/maintainer.py b/frigate/record/maintainer.py
index 68040476ae..6290a2405d 100644
--- a/frigate/record/maintainer.py
+++ b/frigate/record/maintainer.py
@@ -727,7 +727,8 @@ class RecordingMaintainer(threading.Thread):
)
)
elif (
- topic == DetectionTypeEnum.api.value or DetectionTypeEnum.lpr.value
+ topic == DetectionTypeEnum.api.value
+ or topic == DetectionTypeEnum.lpr.value
):
continue
diff --git a/frigate/review/maintainer.py b/frigate/review/maintainer.py
index a51c73f881..4dc1d8e6a4 100644
--- a/frigate/review/maintainer.py
+++ b/frigate/review/maintainer.py
@@ -642,7 +642,10 @@ class ReviewSegmentMaintainer(threading.Thread):
_,
audio_detections,
) = data
- elif topic == DetectionTypeEnum.api.value or DetectionTypeEnum.lpr.value:
+ elif (
+ topic == DetectionTypeEnum.api.value
+ or topic == DetectionTypeEnum.lpr.value
+ ):
(
camera,
frame_time,