Skip to content

Commit

Permalink
Fix place title when place names use open spans
Browse files Browse the repository at this point in the history
The function to determine the latest date for a place had not
been updated for open spans resulting in "?" being incorrectly
displayed as the place title.

Fixes #13222.
  • Loading branch information
Nick-Hall committed Mar 16, 2024
1 parent b3a7f37 commit 57e2323
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gramps/gen/utils/location.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@ def __get_latest_date(place):
latest_date = None
for place_name in place.get_all_names():
date = place_name.get_date_object()
if date.is_empty() or date.modifier == Date.MOD_AFTER:
if date.is_empty() or date.modifier in (Date.MOD_FROM, Date.MOD_AFTER):
return Today()
else:
if date.is_compound():
date1, date2 = date.get_start_stop_range()
date = Date(*date2)
if date.modifier == Date.MOD_BEFORE:
if date.modifier in (Date.MOD_TO, Date.MOD_BEFORE):
date = date - 1
if latest_date is None or date > latest_date:
latest_date = date
Expand Down

0 comments on commit 57e2323

Please sign in to comment.