diff --git a/gramps/gen/proxy/proxybase.py b/gramps/gen/proxy/proxybase.py index 960e7909c..a68c63f02 100644 --- a/gramps/gen/proxy/proxybase.py +++ b/gramps/gen/proxy/proxybase.py @@ -320,9 +320,10 @@ class ProxyDbBase(DbReadBase): Return a list of database handles, one handle for each Person in the database. If sort_handles is True, the list is sorted by surnames """ - # FIXME: this is not a sorted list of handles if self.db.is_open: - return list(self.iter_person_handles()) + proxied = set(self.iter_person_handles()) + all = self.basedb.get_person_handles(sort_handles=sort_handles) + return [hdl for hdl in all if str(hdl, 'utf-8') in proxied] else: return [] @@ -331,9 +332,10 @@ class ProxyDbBase(DbReadBase): Return a list of database handles, one handle for each Family in the database. If sort_handles is True, the list is sorted by surnames """ - # FIXME: this is not a sorted list of handles if self.db.is_open: - return list(self.iter_family_handles()) + proxied = set(self.iter_family_handles()) + all = self.basedb.get_family_handles(sort_handles=sort_handles) + return [hdl for hdl in all if str(hdl, 'utf-8') in proxied] else: return []