Types used for the parent relation by the display_ind_parents()

method and the display_parent() method called by that did not match.
Fixed the bug so that the code for showing the relation only if it's
a non-birth one works.  This bug was inherited from Gramps 2.2.x.


svn: r10706
This commit is contained in:
Eero Tamminen 2008-05-11 19:25:39 +00:00
parent 16e6246463
commit 18fb84db7f

View File

@ -2037,7 +2037,7 @@ class IndividualPage(BasePage):
self.person_link(of, url, _nd.display(person), gid)
else:
of.write(_nd.display(person))
if rel != gen.lib.ChildRefType.BIRTH:
if rel and rel != gen.lib.ChildRefType.BIRTH:
of.write('   (%s)' % str(rel))
of.write('</td>\n')
@ -2058,15 +2058,15 @@ class IndividualPage(BasePage):
family = db.get_family_from_handle(family_handle)
# Get the mother and father relationships
frel = ""
mrel = ""
frel = None
mrel = None
sibling = set()
child_handle = self.person.get_handle()
child_ref_list = family.get_child_ref_list()
for child_ref in child_ref_list:
if child_ref.ref == child_handle:
frel = str(child_ref.get_father_relation())
mrel = str(child_ref.get_mother_relation())
frel = child_ref.get_father_relation()
mrel = child_ref.get_mother_relation()
if not first:
of.write('\t\t\t<tr>\n')