From d3328826ecd2f94947435a994cfb3c49f8e0a3e6 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Wed, 20 Apr 2016 07:18:30 -0400 Subject: [PATCH] get_family_handles with sort_handles --- gramps/plugins/database/dbapi.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gramps/plugins/database/dbapi.py b/gramps/plugins/database/dbapi.py index 1436cb383..614be98e4 100644 --- a/gramps/plugins/database/dbapi.py +++ b/gramps/plugins/database/dbapi.py @@ -370,8 +370,7 @@ class DBAPI(DbGeneric): if sort_handles: self.dbapi.execute("""SELECT DISTINCT family.handle FROM family JOIN person - ON (family.father_handle = person.handle OR - family.mother_handle = person.handle) + ON family.father_handle = person.handle ORDER BY person.primary_name__surname_list__0__surname, person.primary_name__first_name;""") else: