From 7d6da4fedbaea2c24eb6b35efba0dca0133c6fd6 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Tue, 13 Jan 2009 22:25:21 +0000 Subject: [PATCH] Bug #2567: Person Filter bug: 'people without a known birth date' doesn't work correctly svn: r11620 --- src/Filters/Rules/Person/_NoBirthdate.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Filters/Rules/Person/_NoBirthdate.py b/src/Filters/Rules/Person/_NoBirthdate.py index 6ccc58412..6485344b8 100644 --- a/src/Filters/Rules/Person/_NoBirthdate.py +++ b/src/Filters/Rules/Person/_NoBirthdate.py @@ -49,6 +49,10 @@ class NoBirthdate(Rule): if not birth_ref: return True birth = db.get_event_from_handle(birth_ref.ref) - if not birth.get_date_object(): - return True + if birth: + birth_obj = birth.get_date_object() + if not birth_obj: + return True + if birth_obj.sortval == 0: + return True return False