mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 06:07:17 +00:00
Recorder run can be None (#5854)
This commit is contained in:
parent
cbf3a2ecae
commit
b10d20bcab
@ -124,7 +124,8 @@ def run_information(point_in_time: Optional[datetime]=None):
|
||||
res = query(recorder_runs).filter(
|
||||
(recorder_runs.start < point_in_time) &
|
||||
(recorder_runs.end > point_in_time)).first()
|
||||
session.expunge(res)
|
||||
if res:
|
||||
session.expunge(res)
|
||||
return res
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user