From 7ee891943fe993a21a6b2b20aefbb1b59dcd1cb2 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Fri, 8 Jul 2005 22:37:23 +0000 Subject: [PATCH] * src/ChooseParents.py (__init__): Handle events with empty dates. svn: r4913 --- gramps2/ChangeLog | 1 + gramps2/src/ChooseParents.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index f9c0d7042..15e2106af 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,6 +1,7 @@ 2005-07-08 Alex Roitman * src/plugins/GraphViz.py: Use single margin value, properly use cm for margin, properly use 2 digits after converting to inches. + * src/ChooseParents.py (__init__): Handle events with empty dates. 2005-07-07 Julio Sanchez * src/docgen/OpenOfficeDoc.py: Compute correctly the draw:viewBox to diff --git a/gramps2/src/ChooseParents.py b/gramps2/src/ChooseParents.py index cc9469ddb..d631687c7 100644 --- a/gramps2/src/ChooseParents.py +++ b/gramps2/src/ChooseParents.py @@ -103,8 +103,8 @@ class ChooseParents: self.all_females_filter = GenericFilter.GenericFilter() self.all_females_filter.add_rule(GenericFilter.IsFemale([])) - bh = person.birth_handle - if bh and self.db.get_event_from_handle(bh).date.sortval != 0: + bev = self.db.get_event_from_handle(person.birth_handle) + if bev and bev.date and bev.date.sortval != 0: self.likely_females_filter = self.build_likely(False) self.likely_males_filter = self.build_likely(True) else: