Don't overwrite event while cleaning up expired cameras (#8320)

This commit is contained in:
Nicolas Mowen 2023-10-26 05:20:06 -06:00 committed by GitHub
parent 1a9e00ee49
commit cf2b56613f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -98,8 +98,8 @@ class EventCleanup(threading.Thread):
.iterator() .iterator()
) )
# delete the media from disk # delete the media from disk
for event in expired_events: for expired in expired_events:
media_name = f"{event.camera}-{event.id}" media_name = f"{expired.camera}-{expired.id}"
media_path = Path( media_path = Path(
f"{os.path.join(CLIPS_DIR, media_name)}.{file_extension}" f"{os.path.join(CLIPS_DIR, media_name)}.{file_extension}"
) )