SimpleAccess: sort by surname; fixes crash in python3

This commit is contained in:
Doug Blank 2015-06-14 22:02:40 -04:00
parent f1984dad87
commit 5950c7711a

View File

@ -785,7 +785,8 @@ class SimpleAccess(object):
"""
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:
obj = self.dbase.get_person_from_handle(info[1])