Fix bug introduced in new linter

This commit is contained in:
Nick Mowen 2023-06-09 08:35:47 -06:00
parent d3949eebfa
commit 9ef10b05b1
2 changed files with 3 additions and 3 deletions

View File

@ -61,7 +61,7 @@ class EventProcessor(threading.Thread):
def run(self) -> None: def run(self) -> None:
# set an end_time on events without an end_time on startup # set an end_time on events without an end_time on startup
Event.update(end_time=Event.start_time + 30).where( Event.update(end_time=Event.start_time + 30).where(
Event.end_time is None Event.end_time == None
).execute() ).execute()
while not self.stop_event.is_set(): while not self.stop_event.is_set():
@ -95,7 +95,7 @@ class EventProcessor(threading.Thread):
# set an end_time on events without an end_time before exiting # set an end_time on events without an end_time before exiting
Event.update(end_time=datetime.datetime.now().timestamp()).where( Event.update(end_time=datetime.datetime.now().timestamp()).where(
Event.end_time is None Event.end_time == None
).execute() ).execute()
logger.info("Exiting event processor...") logger.info("Exiting event processor...")

View File

@ -115,7 +115,7 @@ class RecordingMaintainer(threading.Thread):
Event.select() Event.select()
.where( .where(
Event.camera == camera, Event.camera == camera,
(Event.end_time is None) (Event.end_time == None)
| (Event.end_time >= recordings[0]["start_time"].timestamp()), | (Event.end_time >= recordings[0]["start_time"].timestamp()),
Event.has_clip, Event.has_clip,
) )