From 40ace9cfaa689644115438994718674fa1de24d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Ignacio=20S=C3=A1nchez=20Lara?= Date: Mon, 9 Jul 2018 17:42:08 +0200 Subject: [PATCH] Send _serial_geocode for single results --- .../cartodb_services/mapbox/bulk_geocoder.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/server/lib/python/cartodb_services/cartodb_services/mapbox/bulk_geocoder.py b/server/lib/python/cartodb_services/cartodb_services/mapbox/bulk_geocoder.py index cb27f22..5c502e3 100644 --- a/server/lib/python/cartodb_services/cartodb_services/mapbox/bulk_geocoder.py +++ b/server/lib/python/cartodb_services/cartodb_services/mapbox/bulk_geocoder.py @@ -59,11 +59,7 @@ class MapboxBulkGeocoder(MapboxGeocoder, StreetPointBulkGeocoder): def _batch_geocode(self, searches): if len(searches) == 1: - # A single search can take advantage of country fixing - search = searches[0] - elements = self._encoded_elements(search) - coordinates = self._geocode_search(*elements) - return [(search[0], coordinates, [])] + return self._serial_geocode(searches) else: frees = [] for search in searches: