Fix restore state by filter out null value row from DB query (#9690)

pull/9692/head
milanvo 2017-10-04 14:13:58 +02:00 committed by Pascal Vizeli
parent 3f9d052218
commit 65de739489
1 changed files with 1 additions and 0 deletions

View File

@ -41,6 +41,7 @@ def last_recorder_run(hass):
with session_scope(hass=hass) as session:
res = (session.query(RecorderRuns)
.filter(RecorderRuns.end.isnot(None))
.order_by(RecorderRuns.end.desc()).first())
if res is None:
return None