5046: GEDCOM import fails on aka name
svn: r17838
This commit is contained in:
parent
5341b4d132
commit
2a10453af0
@ -123,7 +123,7 @@ class SurnameBase(object):
|
||||
|
||||
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
|
||||
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)
|
||||
else:
|
||||
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]))
|
||||
state.person.add_alternate_name(name)
|
||||
|
||||
|
@ -108,7 +108,8 @@ class CalendarReport(Report):
|
||||
name = Name(married_name)
|
||||
else:
|
||||
name = Name(primary_name)
|
||||
name.set_surname(maiden_name)
|
||||
surname_obj = name.get_primary_surname()
|
||||
surname_obj.set_surname(maiden_name)
|
||||
else:
|
||||
name = Name(primary_name)
|
||||
name.set_display_as(self.name_format)
|
||||
|
@ -1009,7 +1009,8 @@ class BasePage(object):
|
||||
name = gen.lib.Name(married_name)
|
||||
else:
|
||||
name = gen.lib.Name(primary_name)
|
||||
name.set_surname(maiden_name)
|
||||
surname_obj = name.get_primary_surname()
|
||||
surname_obj.set_surname(maiden_name)
|
||||
else:
|
||||
name = gen.lib.Name(primary_name)
|
||||
name.set_display_as(name_format)
|
||||
|
Loading…
Reference in New Issue
Block a user