5046: GEDCOM import fails on aka name
svn: r17839
This commit is contained in:
parent
2b25ffec5b
commit
2bb51675ae
@ -123,7 +123,7 @@ class SurnameBase(object):
|
|||||||
|
|
||||||
def get_primary_surname(self):
|
def get_primary_surname(self):
|
||||||
"""
|
"""
|
||||||
Return the string of the surname that is the primary surname
|
Return the surname that is the primary surname
|
||||||
|
|
||||||
:returns: Returns the surname instance that
|
:returns: Returns the surname instance that
|
||||||
is the primary surname. If primary not set, and there is a surname,
|
is the primary surname. If primary not set, and there is a surname,
|
||||||
|
@ -3340,7 +3340,10 @@ class GedcomParser(UpdateCallback):
|
|||||||
state.person.add_attribute(attr)
|
state.person.add_attribute(attr)
|
||||||
else:
|
else:
|
||||||
name = gen.lib.Name()
|
name = gen.lib.Name()
|
||||||
name.set_surname(lname[-1].strip())
|
surname = gen.lib.Surname()
|
||||||
|
surname.set_surname(lname[-1].strip())
|
||||||
|
surname.set_primary()
|
||||||
|
name.set_surname_list([surname])
|
||||||
name.set_first_name(' '.join(lname[0:name_len-1]))
|
name.set_first_name(' '.join(lname[0:name_len-1]))
|
||||||
state.person.add_alternate_name(name)
|
state.person.add_alternate_name(name)
|
||||||
|
|
||||||
|
@ -108,7 +108,8 @@ class CalendarReport(Report):
|
|||||||
name = Name(married_name)
|
name = Name(married_name)
|
||||||
else:
|
else:
|
||||||
name = Name(primary_name)
|
name = Name(primary_name)
|
||||||
name.set_surname(maiden_name)
|
surname_obj = name.get_primary_surname()
|
||||||
|
surname_obj.set_surname(maiden_name)
|
||||||
else:
|
else:
|
||||||
name = Name(primary_name)
|
name = Name(primary_name)
|
||||||
name.set_display_as(self.name_format)
|
name.set_display_as(self.name_format)
|
||||||
|
@ -1009,7 +1009,8 @@ class BasePage(object):
|
|||||||
name = gen.lib.Name(married_name)
|
name = gen.lib.Name(married_name)
|
||||||
else:
|
else:
|
||||||
name = gen.lib.Name(primary_name)
|
name = gen.lib.Name(primary_name)
|
||||||
name.set_surname(maiden_name)
|
surname_obj = name.get_primary_surname()
|
||||||
|
surname_obj.set_surname(maiden_name)
|
||||||
else:
|
else:
|
||||||
name = gen.lib.Name(primary_name)
|
name = gen.lib.Name(primary_name)
|
||||||
name.set_display_as(name_format)
|
name.set_display_as(name_format)
|
||||||
|
Loading…
Reference in New Issue
Block a user