mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-03-12 05:44:06 +00:00
fix: ensure Locales is not initialized when provided in options
This commit is contained in:
@@ -132,7 +132,7 @@ def _add_parent_rows_grouped(writer: JsonWriter, rows: AddressLines,
|
|||||||
|
|
||||||
@dispatch.format_func(DetailedResult, 'json')
|
@dispatch.format_func(DetailedResult, 'json')
|
||||||
def _format_details_json(result: DetailedResult, options: Mapping[str, Any]) -> str:
|
def _format_details_json(result: DetailedResult, options: Mapping[str, Any]) -> str:
|
||||||
locales = options.get('locales', Locales())
|
locales = options.get('locales') or Locales()
|
||||||
geom = result.geometry.get('geojson')
|
geom = result.geometry.get('geojson')
|
||||||
centroid = result.centroid.to_geojson()
|
centroid = result.centroid.to_geojson()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user