Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes bug #0013431. Tests for current_date being an empty date #1774

Open
wants to merge 1 commit into
base: maintenance/gramps52
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 7 additions & 10 deletions gramps/gen/utils/alive.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,9 +461,7 @@ def ancestors_too_old(person, year):
return (None, None, "", None)
self.pset.add(person.handle)
LOG.debug(
"ancestors_too_old('%s', %s)".format(
name_displayer.display(person), year
)
"ancestors_too_old('%s', %s)", name_displayer.display(person), year
)
family_handle = person.get_main_parents_family_handle()
if family_handle:
Expand Down Expand Up @@ -669,15 +667,14 @@ def probably_alive(
birth, death, explain, relative = probably_alive_range(
person, db, max_sib_age_diff, max_age_prob_alive, avg_generation_gap
)
if current_date is None:
if current_date is None or not current_date.is_valid():
current_date = Today()
LOG.debug(
"%s: b.%s, d.%s - %s".format(
" ".join(person.get_primary_name().get_text_data_list()),
birth,
death,
explain,
)
"%s: b.%s, d.%s - %s",
name_displayer.display(person),
birth,
death,
explain,
)
if not birth or not death:
# no evidence, must consider alive
Expand Down