GEP 021: import new xml, primary not present means primary name

svn: r16122
This commit is contained in:
Benny Malengier 2010-11-02 20:49:56 +00:00
parent c47079ba37
commit 3fbd09ad90

View File

@ -1331,7 +1331,7 @@ class GrampsParser(UpdateCallback):
def start_surname(self, attrs): def start_surname(self, attrs):
self.surname = gen.lib.Surname() self.surname = gen.lib.Surname()
self.surname.set_prefix(attrs.get("prefix", "")) self.surname.set_prefix(attrs.get("prefix", ""))
self.surname.set_primary(bool(attrs.get("primary",0))) self.surname.set_primary(bool(attrs.get("prim", 1)))
self.surname.set_connector(attrs.get("connector", "")) self.surname.set_connector(attrs.get("connector", ""))
origin_type = attrs.get("derivation", "") origin_type = attrs.get("derivation", "")
self.surname.origintype.set_from_xml_str(origin_type) self.surname.origintype.set_from_xml_str(origin_type)
@ -2147,7 +2147,6 @@ class GrampsParser(UpdateCallback):
self.surname = None self.surname = None
self.surnamepat = None self.surnamepat = None
def stop_aka(self, tag): def stop_aka(self, tag):
if self.name.get_type() == "": if self.name.get_type() == "":
self.name.set_type(gen.lib.NameType.AKA) self.name.set_type(gen.lib.NameType.AKA)