Working xml export

svn: r15948
This commit is contained in:
Benny Malengier
2010-10-02 13:38:36 +00:00
parent 043d35a354
commit 0ca48dd811
5 changed files with 39 additions and 20 deletions

View File

@@ -1356,7 +1356,12 @@ class DbBsddbRead(DbReadBase, Callback):
return self.__has_handle(self.source_map, handle)
def __sortbyperson_key(self, person):
return locale.strxfrm(self.person_map.get(str(person))[3][5])
surnlist = self.person_map.get(str(person))[3][5]
if surnlist:
surn = " ".join([x[0] for x in surnlist])
else:
surn = ""
return locale.strxfrm(surn)
def __sortbyplace(self, first, second):
return locale.strcoll(self.place_map.get(str(first))[2],

View File

@@ -47,6 +47,7 @@ class Surname(SecondaryObject):
def __init__(self, source=None, data=None):
"""Create a new Surname instance, copying from the source if provided.
By default a surname is created as primary, use set_primary to change
"""
if source:
self.surname = source.surname
@@ -57,7 +58,7 @@ class Surname(SecondaryObject):
else:
self.surname = ""
self.prefix = ""
self.primary = False
self.primary = True
self.origintype = NameOriginType()
self.connector = ""
if data: