Merge pull request #426 from CartoDB/425-Fixed_country_code_problem
Fixed country code problem
This commit is contained in:
commit
72b99a1729
@ -66,6 +66,8 @@ class MapboxGeocoder(Traceable):
|
||||
if state_province:
|
||||
address.append(state_province)
|
||||
|
||||
country = [country] if country else None
|
||||
|
||||
try:
|
||||
response = self._geocoder.forward(address=', '.join(address),
|
||||
country=country,
|
||||
|
@ -29,3 +29,8 @@ class MapboxGeocoderTestCase(unittest.TestCase):
|
||||
place = self.geocoder.geocode(searchtext='Barcelona')
|
||||
|
||||
assert place
|
||||
|
||||
def test_valid_request_namedplace2(self):
|
||||
place = self.geocoder.geocode(searchtext='New York', country='us')
|
||||
|
||||
assert place
|
||||
|
Loading…
Reference in New Issue
Block a user