Skip to content

Commit

Permalink
Fix single event return
Browse files Browse the repository at this point in the history
  • Loading branch information
NickM-27 committed Dec 12, 2024
1 parent 53b96df commit 9f0d29f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion frigate/events/cleanup.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,11 @@ def expire_clips(self) -> list[str]:
events_to_update = []

for batch in query.iterator():
events_to_update.extend([event.id for event in batch])
try:
events_to_update.extend([event.id for event in batch])
except TypeError:
events_to_update.append(batch)

if len(events_to_update) >= CHUNK_SIZE:
logger.debug(
f"Updating {update_params} for {len(events_to_update)} events"
Expand Down

0 comments on commit 9f0d29f

Please sign in to comment.