SimpleAccess: sort by surname; fixes crash in python3

This commit is contained in:
Doug Blank 2015-06-14 22:02:40 -04:00
parent 60c0843861
commit fde34bb53b

View File

@ -785,7 +785,8 @@ class SimpleAccess(object):
""" """
with self.dbase.get_person_cursor() as cursor: with self.dbase.get_person_cursor() as cursor:
slist = sorted((data[3][3], key) for key, data in cursor) # data[3] is primary_name; data[3][5][0][0] is surname
slist = sorted((data[3][5][0][0], key) for key, data in cursor)
for info in slist: for info in slist:
obj = self.dbase.get_person_from_handle(info[1]) obj = self.dbase.get_person_from_handle(info[1])