We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 56a7443 commit 44f4da1Copy full SHA for 44f4da1
app/data/__init__.py
@@ -33,8 +33,12 @@ def get_data(category):
33
# Filter out all the dates.
34
history = dict(filter(lambda element: date_util.is_date(element[0]), item.items()))
35
36
+ # Country for this location.
37
country = item['Country/Region']
38
39
+ # Latest data insert.
40
+ latest = list(history.values())[-1];
41
+
42
# Normalize the item and append to locations.
43
locations.append({
44
# General info.
@@ -52,7 +56,7 @@ def get_data(category):
52
56
'history': history,
53
57
54
58
# Latest statistic.
55
- 'latest': int(list(history.values())[-1]),
59
+ 'latest': int(latest) if latest else 0,
60
})
61
62
# Latest total.
0 commit comments