Fix hass_storage not clearing task (#95209)
hass_storage would never allow another load if the no data path was hit discovered while writing tests for https://github.com/home-assistant/core/pull/95202pull/95220/head
parent
62e518badb
commit
c1045d6c82
|
@ -1218,6 +1218,8 @@ def mock_storage(
|
||||||
if store._data is None:
|
if store._data is None:
|
||||||
# No data to load
|
# No data to load
|
||||||
if store.key not in data:
|
if store.key not in data:
|
||||||
|
# Make sure the next attempt will still load
|
||||||
|
store._load_task = None
|
||||||
return None
|
return None
|
||||||
|
|
||||||
mock_data = data.get(store.key)
|
mock_data = data.get(store.key)
|
||||||
|
|
Loading…
Reference in New Issue