Handle married_rel_str if there is no spouse

svn: r4498
This commit is contained in:
Don Allingham 2005-05-06 21:11:46 +00:00
parent 3efcde6066
commit 92f89387cb
2 changed files with 7 additions and 0 deletions

@ -1,4 +1,6 @@
2005-05-06 Don Allingham <dona@gramps-project.org>
* src/ReportUtils.py: check for spouse existance before creating a
marriage string - return an empty string instead.
* src/ReadXML.py: fix handling of non-gregorian dates
* src/EditPerson.py: faster building of place lists using cursors

@ -908,6 +908,11 @@ def married_str(database,person,spouse,event,endnotes=None,
def married_rel_str(database,person,family,is_first=True):
spouse_handle = find_spouse(person,family)
spouse = database.get_person_from_handle(spouse_handle)
# not all families have a spouse.
if not spouse_handle or not spouse:
return u""
spouse_name = _nd.display(spouse)
if is_first: