[MERGE] forward port branch 10.0 up to 2d30bd9698
This commit is contained in:
@@ -31,7 +31,13 @@ def geo_find(addr, apikey=False):
|
|||||||
if result['status'] != 'OK':
|
if result['status'] != 'OK':
|
||||||
if result.get('error_message'):
|
if result.get('error_message'):
|
||||||
_logger.error(result['error_message'])
|
_logger.error(result['error_message'])
|
||||||
return None
|
error_msg = _('Unable to geolocate, received the error:\n%s'
|
||||||
|
'\n\nGoogle made this a paid feature.\n'
|
||||||
|
'You should first enable billing on your Google account.\n'
|
||||||
|
'Then, go to Developer Console, and enable the APIs:\n'
|
||||||
|
'Geocoding, Maps Static, Maps Javascript.\n'
|
||||||
|
% result['error_message'])
|
||||||
|
raise UserError(error_msg)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
geo = result['results'][0]['geometry']['location']
|
geo = result['results'][0]['geometry']['location']
|
||||||
|
|||||||
Reference in New Issue
Block a user