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 a0f8169 commit 4de23faCopy full SHA for 4de23fa
app/location/__init__.py
@@ -27,12 +27,13 @@ def country_population(self):
27
"""
28
Gets the population of this location.
29
30
+ country_code = self.country_code
31
32
# Population data is unavailable for provinces
- if self.province:
33
+ if not self.country_code:
34
return None
35
else:
- return countrypopulation.get_population_dict()[self.country_code]
36
+ return countrypopulation.get_population_dict()[country_code]
37
38
@property
39
def country_code(self):
@@ -106,4 +107,4 @@ def serialize(self, timelines = False):
106
107
}})
108
109
# Return the serialized location.
- return serialized
110
+ return serialized
0 commit comments