Skip to content
Merged
Prev Previous commit
Next Next commit
change population property to country_population
  • Loading branch information
Turreted committed Mar 25, 2020
commit 36963dab5242aa0eb365cf07dddacc438d6415a5
5 changes: 2 additions & 3 deletions app/location/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from ..coordinates import Coordinates
from ..utils import countrycodes
from ..services.population import countrypopulation
from ..utils.population import countrypopulation

class Location:
"""
Expand All @@ -23,7 +23,7 @@ def __init__(self, id, country, province, coordinates, last_updated, confirmed,
self.recovered = recovered

@property
def population(self):
def country_population(self):
"""
Gets the population of this location.
"""
Expand All @@ -32,7 +32,6 @@ def population(self):
if self.province:
return None
else:
print(countrypopulation.get_population_dict()[self.country_code])
return countrypopulation.get_population_dict()[self.country_code]

@property
Expand Down