]> git.openstreetmap.org Git - nominatim.git/blobdiff - nominatim/tools/country_info.py
initialize an empty dictionary for nested name key
[nominatim.git] / nominatim / tools / country_info.py
index 87be7290759765b1786b81c5fff66b916df2133d..6822202996debbb16b2c88485653d87d3082bb54 100644 (file)
@@ -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.