From a1b069e3d8aabc4e85203690210028208845b319 Mon Sep 17 00:00:00 2001 From: Nick Hall Date: Fri, 16 May 2014 18:03:30 +0100 Subject: [PATCH] Fix import bug introduced in [27dab7] --- 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 a519ce71d..fc86cb12c 100644 --- a/gramps/plugins/importer/importxml.py +++ b/gramps/plugins/importer/importxml.py @@ -1149,8 +1149,9 @@ class GrampsParser(UpdateCallback): self.inaugurate_id(attrs.get('id'), PLACE_KEY, self.placeobj) self.placeobj.private = bool(attrs.get("priv")) self.placeobj.change = int(attrs.get('change', self.change)) - self.placeobj.name = attrs.get("name") - self.placeobj.place_type.set_from_xml_str(attrs.get("type")) + 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.info.add('new-object', PLACE_KEY, self.placeobj) # GRAMPS LEGACY: title in the placeobj tag