mirror of
https://github.com/home-assistant/core.git
synced 2025-08-05 21:55:10 +02:00
Guard for index error in picnic (#67345)
This commit is contained in:
@@ -112,7 +112,7 @@ class PicnicUpdateCoordinator(DataUpdateCoordinator):
|
|||||||
next_delivery = (
|
next_delivery = (
|
||||||
copy.deepcopy(next_deliveries[-1]) if next_deliveries else {}
|
copy.deepcopy(next_deliveries[-1]) if next_deliveries else {}
|
||||||
)
|
)
|
||||||
last_order = copy.deepcopy(deliveries[0])
|
last_order = copy.deepcopy(deliveries[0]) if deliveries else {}
|
||||||
except (KeyError, TypeError):
|
except (KeyError, TypeError):
|
||||||
# A KeyError or TypeError indicate that the response contains unexpected data
|
# A KeyError or TypeError indicate that the response contains unexpected data
|
||||||
return {}, {}
|
return {}, {}
|
||||||
|
Reference in New Issue
Block a user