mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-05 04:57:42 +03:00
fix ongoing events from being returned for all review queries
The existing condition will include any record with a null end_time regardless of when it started, as long as the start_time is greater than the after param. With this fix, both the start time needs to be within the specified range, and for events that have already ended, their end time must be before the before param
This commit is contained in:
parent
f98dd7d31f
commit
f5fd42bab0
@ -58,13 +58,9 @@ async def review(
|
||||
)
|
||||
|
||||
clauses = [
|
||||
(
|
||||
(ReviewSegment.start_time > after)
|
||||
& (
|
||||
(ReviewSegment.end_time.is_null(True))
|
||||
| (ReviewSegment.end_time < before)
|
||||
)
|
||||
)
|
||||
& (ReviewSegment.start_time < before)
|
||||
& ((ReviewSegment.end_time.is_null(True)) | (ReviewSegment.end_time < before))
|
||||
]
|
||||
|
||||
if cameras != "all":
|
||||
|
||||
Loading…
Reference in New Issue
Block a user