Going green with empty responses

This commit is contained in:
Mario de Frutos 2018-01-31 12:07:54 +01:00
parent 876bae6b56
commit 850dc09a4f

View File

@ -39,7 +39,7 @@ class MapboxGeocoder(Traceable):
def _parse_geocoder_response(self, response):
json_response = json.loads(response)
if json_response:
if json_response and json_response[ENTRY_FEATURES]:
feature = json_response[ENTRY_FEATURES][0]
return self._extract_lng_lat_from_feature(feature)