diff --git a/app/location/__init__.py b/app/location/__init__.py index c60f362a..9f7cdd7d 100644 --- a/app/location/__init__.py +++ b/app/location/__init__.py @@ -61,9 +61,9 @@ def __init__(self, id, country, province, coordinates, timelines): id, country, province, coordinates, # Statistics (retrieve latest from timelines). - confirmed=timelines.get('confirmed').latest, - deaths=timelines.get('deaths').latest, - recovered=timelines.get('recovered').latest, + confirmed=timelines.get('confirmed').latest or 0, + deaths=timelines.get('deaths').latest or 0, + recovered=timelines.get('recovered').latest or 0, ) # Set timelines.