]> git.openstreetmap.org Git - nominatim.git/commitdiff
initialize an empty dictionary for nested name key
authorTareq Al-Ahdal <tareqoalahdal@gmail.com>
Thu, 17 Mar 2022 18:50:33 +0000 (02:50 +0800)
committerTareq Al-Ahdal <tareqoalahdal@gmail.com>
Thu, 17 Mar 2022 18:50:33 +0000 (02:50 +0800)
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.