Don't catch detections

This commit is contained in:
Nicolas Mowen 2024-12-09 08:12:20 -07:00
parent bfb7c457dc
commit d1d0039689

View File

@ -298,7 +298,13 @@ class EventCleanup(threading.Thread):
.where( .where(
Event.camera == name, Event.camera == name,
Event.retain_indefinitely == False, Event.retain_indefinitely == False,
(Event.end_time < alert_expire_date) (
(
(Event.data["max_severity"] != "detection")
| (Event.data["max_severity"].is_null())
)
& (Event.end_time < alert_expire_date)
)
| ( | (
(Event.data["max_severity"] == "detection") (Event.data["max_severity"] == "detection")
& (Event.end_time < detection_expire_date) & (Event.end_time < detection_expire_date)