diff --git a/gramps/gen/db/upgrade.py b/gramps/gen/db/upgrade.py index 5bc137266..9ab1fdbfb 100644 --- a/gramps/gen/db/upgrade.py +++ b/gramps/gen/db/upgrade.py @@ -200,7 +200,11 @@ def gramps_upgrade_17(self): else: placeref_list = [] - type_num = 7 - level if name else -1 + if name: + type_num = 7 - level + else: + name = new_place[2] + type_num = -1 new_place = new_place[:5] + [placeref_list, name, [], (type_num, ''), zip_code] + \ new_place[6:12] + [[]] + new_place[12:] diff --git a/gramps/plugins/importer/importxml.py b/gramps/plugins/importer/importxml.py index a0bb7deb0..c01621fb9 100644 --- a/gramps/plugins/importer/importxml.py +++ b/gramps/plugins/importer/importxml.py @@ -2619,6 +2619,8 @@ class GrampsParser(UpdateCallback): self.placeobj.add_alternative_name(place_name) def stop_placeobj(self, *tag): + if self.placeobj.name.get_value() == '': + self.placeobj.name.set_value(self.placeobj.title) self.db.commit_place(self.placeobj, self.trans, self.placeobj.get_change_time()) self.placeobj = None