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