From 0faaae0201e27dae2c666815943a718372a8a755 Mon Sep 17 00:00:00 2001 From: Eero Tamminen Date: Fri, 18 Feb 2005 19:22:06 +0000 Subject: [PATCH] Fix StatisticsChart.py date object checking svn: r4048 --- gramps2/ChangeLog | 3 +++ gramps2/src/plugins/StatisticsChart.py | 12 +++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 8459e8022..2d4554bd1 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,6 @@ +2005-02-18 Eero Tamminen + * src/plugins/StatisticsChart.py: fix date object checking + 2005-02-17 Don Allingham * src/EditPerson.py: more readonly support * src/NoteEdit.py: more readonly support diff --git a/gramps2/src/plugins/StatisticsChart.py b/gramps2/src/plugins/StatisticsChart.py index ce15bd901..74a63cdce 100755 --- a/gramps2/src/plugins/StatisticsChart.py +++ b/gramps2/src/plugins/StatisticsChart.py @@ -396,17 +396,19 @@ class Extract: continue # check whether birth year is within required range - birth = self.get_birth(person).get_date_object() + birth = self.get_birth(person) if birth: - if birth.get_year_valid(): - year = birth.get_year() + birthdate = birth.get_date_object() + if birthdate.get_year_valid(): + year = birthdate.get_year() if not (year >= year_from and year <= year_to): continue else: # if death before range, person's out of range too... - death = self.get_death(person).get_date_object() + death = self.get_death(person) if death: - if death.get_year_valid() and death.get_year() < year_from: + deathdate = death.get_date_object() + if deathdate.get_year_valid() and deathdate.get_year() < year_from: continue if not no_years: # do not accept people who are not known to be in range