Skip to content

NVR with realtime local object detection for IP cameras

Fix recording cleanup logic again (#13527)

Nicolas Mowene80322dab759
diff --git a/frigate/record/cleanup.py b/frigate/record/cleanup.py
index 9ac7f7f914..615b6bdbdd 100644
--- a/frigate/record/cleanup.py
+++ b/frigate/record/cleanup.py
@@ -74,14 +74,12 @@ class RecordingCleanup(threading.Thread):
.where(ReviewSegment.camera == config.name)
.where(
(
- ReviewSegment.severity
- == "alert" & ReviewSegment.end_time
- < alert_expire_date
+ (ReviewSegment.severity == "alert")
+ & (ReviewSegment.end_time < alert_expire_date)
)
| (
- ReviewSegment.severity
- == "detection" & ReviewSegment.end_time
- < detection_expire_date
+ (ReviewSegment.severity == "detection")
+ & (ReviewSegment.end_time < detection_expire_date)
)
)
.namedtuples()