From b1fc676a557a35bcb2bcbc90d7cf5fef68d1c495 Mon Sep 17 00:00:00 2001 From: Paul Culley Date: Tue, 27 Nov 2018 20:13:30 -0600 Subject: [PATCH] Fix AgeOnDate and some reports using SimpleAccess for missing surname (#708) Fixes #9958 Fixes #9800 --- gramps/gen/simple/_simpleaccess.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gramps/gen/simple/_simpleaccess.py b/gramps/gen/simple/_simpleaccess.py index 6df4d4839..042bf9ae1 100644 --- a/gramps/gen/simple/_simpleaccess.py +++ b/gramps/gen/simple/_simpleaccess.py @@ -787,7 +787,8 @@ class SimpleAccess: with self.dbase.get_person_cursor() as 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) + slist = sorted((data[3][5][0][0] if data[3][5] else '', key) + for key, data in cursor) for info in slist: obj = self.dbase.get_person_from_handle(info[1])