Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
nat236919 committed Jul 23, 2020
2 parents 02fac00 + 6d7ec01 commit 0ab8a6c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
app = FastAPI(
title='COVID-19 API',
description='Simply FAST API for COVID-19 cases exploration',
version='2.0.0'
version='2.0.2'
)

# Setup CORS (https://fastapi.tiangolo.com/tutorial/cors/)
Expand Down
4 changes: 2 additions & 2 deletions app/models/covid_model_api_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ def get_country(self, country_name: str) -> Dict[str, Any]:
if country_name not in [country_data['location'].lower() for country_data in all_country_data]:
country_name = self.lookup_table[country_name.upper()] # translate country code to its name

data = [country_data for country_data in all_country_data
if country_name.lower() == country_data['location'].lower()][0]
data = [country_data for country_data in all_country_data if country_name.lower() == country_data['location'].lower()]
data = data[0] if data else data

return data

Expand Down

0 comments on commit 0ab8a6c

Please sign in to comment.