mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 15:17:35 +00:00
[recorder] Run end model changed in session scope (#5858)
This commit is contained in:
parent
23ff2eb79c
commit
cbf3a2ecae
@ -421,8 +421,8 @@ class Recorder(threading.Thread):
|
||||
|
||||
def _close_run(self):
|
||||
"""Save end time for current run."""
|
||||
self._run.end = dt_util.utcnow()
|
||||
with session_scope() as session:
|
||||
self._run.end = dt_util.utcnow()
|
||||
self._commit(session, self._run)
|
||||
self._run = None
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user