From d32a7c18881a3dcbafbe3544187c6636a966ded0 Mon Sep 17 00:00:00 2001 From: Tareq Al-Ahdal Date: Fri, 18 Mar 2022 02:50:33 +0800 Subject: [PATCH] initialize an empty dictionary for nested name key --- nominatim/tools/country_info.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nominatim/tools/country_info.py b/nominatim/tools/country_info.py index 87be7290..68222029 100644 --- a/nominatim/tools/country_info.py +++ b/nominatim/tools/country_info.py @@ -35,8 +35,8 @@ class _CountryInfo: elif not isinstance(prop['languages'], list): prop['languages'] = [x.strip() for x in prop['languages'].split(',')] - if 'name' not in prop: - prop['name'] = {} + if 'names' not in prop: + prop['names']['name'] = {} def items(self): """ Return tuples of (country_code, property dict) as iterable. -- 2.39.5