From 8bbc216d17cf745612998b7539c10de7eb31d14d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Rapinat?= Date: Sat, 23 Mar 2013 17:12:45 +0000 Subject: [PATCH] 6544: add warning if place on event is missing by using proxies sequence svn: r21723 --- 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): """