From a8015addbf5811edeeb1c80e9e12ae233051e951 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Wed, 23 May 2018 08:06:52 +0000 Subject: [PATCH] Only take the first component of formatted_address --- platypush/plugins/google/maps.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platypush/plugins/google/maps.py b/platypush/plugins/google/maps.py index 722e19dea..64343b1aa 100644 --- a/platypush/plugins/google/maps.py +++ b/platypush/plugins/google/maps.py @@ -33,7 +33,7 @@ class GoogleMapsPlugin(GooglePlugin): logging.info('Google Maps geocode response for latlng ({},{}): {}'. format(latitude, longitude, result)) - address['address'] = result['formatted_address'] + address['address'] = result['formatted_address'].split(',')[0] for addr_component in result['address_components']: for component_type in addr_component['types']: if component_type == 'locality':