Skip to content

Commit

Permalink
Don't catch detections
Browse files Browse the repository at this point in the history
  • Loading branch information
NickM-27 committed Dec 9, 2024
1 parent bfb7c45 commit d1d0039
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion frigate/events/cleanup.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,13 @@ def expire_clips(self) -> list[str]:
.where(
Event.camera == name,
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.end_time < detection_expire_date)
Expand Down

0 comments on commit d1d0039

Please sign in to comment.