From b4e5bd9eb2b582c7caac84d7b37693b13f923004 Mon Sep 17 00:00:00 2001 From: Paul Culley Date: Tue, 27 Nov 2018 18:47:49 -0600 Subject: [PATCH] Fix HandleErrors related to LDS (#697) * Fix ReferencedBySelection proxy for 'None' LDS Parents Fixes #10865 * Fix HandleError in Citations Gramplet for lds place missing --- gramps/gen/proxy/referencedbyselection.py | 7 ++++--- gramps/plugins/gramplet/citations.py | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/gramps/gen/proxy/referencedbyselection.py b/gramps/gen/proxy/referencedbyselection.py index 7c4beb87b..4b678ccb3 100644 --- a/gramps/gen/proxy/referencedbyselection.py +++ b/gramps/gen/proxy/referencedbyselection.py @@ -427,9 +427,10 @@ class ReferencedBySelectionProxyDb(ProxyDbBase): def process_lds_ord(self, lds_ord): """ Find all of the primary objects referred to """ fam_handle = lds_ord.get_family_handle() - fam = self.db.get_family_from_handle(fam_handle) - if fam: - self.queue_object("Family", fam_handle) + if fam_handle: + fam = self.db.get_family_from_handle(fam_handle) + if fam: + self.queue_object("Family", fam_handle) place_handle = lds_ord.get_place_handle() if place_handle: diff --git a/gramps/plugins/gramplet/citations.py b/gramps/plugins/gramplet/citations.py index b31e365d4..12902f919 100644 --- a/gramps/plugins/gramplet/citations.py +++ b/gramps/plugins/gramplet/citations.py @@ -249,9 +249,10 @@ class Citations(Gramplet, DbGUIElement): if self.check_citations(lds): return True place_handle = lds.get_place_handle() - place = self.dbstate.db.get_place_from_handle(place_handle) - if place and self.check_place_citations(place): - return True + if place_handle: + place = self.dbstate.db.get_place_from_handle(place_handle) + if place and self.check_place_citations(place): + return True return False def check_association_citations(self, obj):