4651: XML import of name with only display or sort format set fails
svn: r16633
This commit is contained in:
parent
10342a03cc
commit
01aa78127e
@ -1287,16 +1287,20 @@ class GrampsParser(UpdateCallback):
|
||||
self.alt_name = bool(attrs.get("alt", 0))
|
||||
try:
|
||||
sort_as = int(attrs["sort"])
|
||||
display_as = int(attrs["display"])
|
||||
|
||||
# check if these pointers need to be remapped
|
||||
# and set the name attributes
|
||||
if sort_as in self.name_formats_map:
|
||||
self.name.sort_as = self.name_formats_map[sort_as]
|
||||
else:
|
||||
self.name.sort_as = sort_as
|
||||
except KeyError:
|
||||
pass
|
||||
try:
|
||||
display_as = int(attrs["display"])
|
||||
# check if these pointers need to be remapped
|
||||
# and set the name attributes
|
||||
if display_as in self.name_formats_map:
|
||||
self.name.sort_as = self.name_formats_map[display_as]
|
||||
self.name.display_as = self.name_formats_map[display_as]
|
||||
else:
|
||||
self.name_display_as = display_as
|
||||
except KeyError:
|
||||
|
Loading…
Reference in New Issue
Block a user