diff --git a/apps/search_indexes/serializers.py b/apps/search_indexes/serializers.py index 598b60bf..925bd6c7 100644 --- a/apps/search_indexes/serializers.py +++ b/apps/search_indexes/serializers.py @@ -86,7 +86,12 @@ class EstablishmentDocumentSerializer(DocumentSerializer): if ret.get('address'): ret['address']['city']['country']['name_translated'] = get_translated_value( ret['address']['city']['country'].pop('name')) + location = ret['address'].pop('location') + if location: + ret['address']['geo_lon'] = location['lon'] + ret['address']['geo_lat'] = location['lat'] ret['type'] = ret.pop('establishment_type') ret['subtypes'] = ret.pop('establishment_subtypes') + return ret \ No newline at end of file