From baaa890efc05c5d5544678b96fa7d385e261a52b Mon Sep 17 00:00:00 2001 From: "Craig J. Anderson" Date: Thu, 10 Feb 2011 14:41:46 +0000 Subject: [PATCH] added 'raise ReportError' if the person/family is not in the database (cli mostly) svn: r16596 --- src/plugins/drawreport/DescendTree.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins/drawreport/DescendTree.py b/src/plugins/drawreport/DescendTree.py index 3d7bfea2b..ce0e2fdd5 100644 --- a/src/plugins/drawreport/DescendTree.py +++ b/src/plugins/drawreport/DescendTree.py @@ -667,6 +667,8 @@ class MakePersonTree(RecurseDown): persons = [] center1 = self.database.get_person_from_gramps_id(person_id) + if center1 is None: + raise ReportError(_("Person %s is not in the Database") % person_id) center1_h = center1.get_handle() #could be mom too. family2 = family2_h = None @@ -733,6 +735,8 @@ class MakeFamilyTree(RecurseDown): # Step 1 print out my fathers, fathers, # other wives families first (if needed) family1 = self.database.get_family_from_gramps_id(family_id) + if family1 is None: + raise ReportError(_("Family %s is not in the Database") % family_id) family1_h = family1.get_handle() #######################