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/95202
This commit is contained in:
J. Nick Koston 2023-06-25 18:54:02 -05:00 committed by GitHub
parent 62e518badb
commit c1045d6c82
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1218,6 +1218,8 @@ def mock_storage(
if store._data is None:
# No data to load
if store.key not in data:
# Make sure the next attempt will still load
store._load_task = None
return None
mock_data = data.get(store.key)