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