From c4d6d17d6997069fbc6bf1310390ad69971d553a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Rapinat?= Date: Sat, 23 Mar 2013 17:14:24 +0000 Subject: [PATCH] 6544: add warning if place on event is missing by using proxies sequence svn: r21724 --- gramps/gen/proxy/referencedbyselection.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/gramps/gen/proxy/referencedbyselection.py b/gramps/gen/proxy/referencedbyselection.py index 79f464efd..9739fb482 100644 --- a/gramps/gen/proxy/referencedbyselection.py +++ b/gramps/gen/proxy/referencedbyselection.py @@ -232,9 +232,13 @@ class ReferencedBySelectionProxyDb(ProxyDbBase): self.process_attributes(event) place_handle = event.get_place_handle() - place = self.db.get_place_from_handle(place_handle) - if place: - self.process_place(place) + try: + place = self.db.get_place_from_handle(place_handle) + if place: + self.process_place(place) + except AttributeError: + import logging + logging.warning('Event:%s; Handle:%s' % (event, event.handle)) def process_place(self, place): """