From 55c7becb68c2314d5a2c3a80d7a454a4efed991a Mon Sep 17 00:00:00 2001 From: Nick Hall Date: Mon, 2 Feb 2015 17:32:15 +0000 Subject: [PATCH] Update import to cope with missing place name and type --- gramps/plugins/importer/importxml.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gramps/plugins/importer/importxml.py b/gramps/plugins/importer/importxml.py index dc1165f3e..50a105a9a 100644 --- a/gramps/plugins/importer/importxml.py +++ b/gramps/plugins/importer/importxml.py @@ -1150,8 +1150,9 @@ class GrampsParser(UpdateCallback): self.placeobj.private = bool(attrs.get("priv")) self.placeobj.change = int(attrs.get('change', self.change)) if self.__xml_version >= (1, 6, 0): - self.placeobj.name = attrs.get("name") - self.placeobj.place_type.set_from_xml_str(attrs.get("type")) + self.placeobj.name = attrs.get('name', '') + if 'type' in attrs: + self.placeobj.place_type.set_from_xml_str(attrs.get('type')) self.info.add('new-object', PLACE_KEY, self.placeobj) # GRAMPS LEGACY: title in the placeobj tag