From 07c58b191b97abbf102410dbea1e5312d7fdc1e7 Mon Sep 17 00:00:00 2001 From: SNoiraud Date: Mon, 8 Apr 2024 16:17:03 +0200 Subject: [PATCH] Trying to have better error handling. --- gramps/plugins/webreport/updates.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/gramps/plugins/webreport/updates.py b/gramps/plugins/webreport/updates.py index 47731d6ee63..429101108fb 100644 --- a/gramps/plugins/webreport/updates.py +++ b/gramps/plugins/webreport/updates.py @@ -293,8 +293,12 @@ def list_people_changed(self, object_type): def sort_on_change(handle): """sort records based on the last change time""" - obj = fct(handle) - timestamp = obj.get_change_time() + try: + obj = fct(handle) + timestamp = obj.get_change_time() + except exception: + print("In sort :", handle, " not found for", object_type) + timestamp = 0 return timestamp if object_type == Person: @@ -323,7 +327,11 @@ def sort_on_change(handle): for handle in obj_list: date = obj = None name = "" - obj = fct(handle) + try: + obj = fct(handle) + except exception: + print("Handle not found:", handle, " not found for", object_type) + continue if object_type == Person: name = fct_link(handle) elif object_type == Family: