8451: Fix crash on RelGraph report with unknown gender
This commit is contained in:
parent
54ea8eb1b7
commit
bacc3ee5e8
@ -335,7 +335,7 @@ def get_child_unknown(level, inlaw=""):
|
||||
else:
|
||||
return "un descendant lointain%s" % inlaw
|
||||
|
||||
def get_sibling_unknown(inlaw=""):
|
||||
def get_sibling_unknown(Ga, inlaw=""):
|
||||
"""
|
||||
sibling of an ancestor, gender = unknown
|
||||
"""
|
||||
@ -655,7 +655,7 @@ class RelationshipCalculator(gramps.gen.relationship.RelationshipCalculator):
|
||||
elif gender_b == Person.FEMALE:
|
||||
rel_str = "la tante lointaine" + bygen % (Ga + 1)
|
||||
elif gender_b == Person.UNKNOWN:
|
||||
rel_str = get_sibling_unknown(inlaw)
|
||||
rel_str = get_sibling_unknown(Ga, inlaw)
|
||||
else:
|
||||
return rel_str
|
||||
elif Ga == 1:
|
||||
@ -674,7 +674,7 @@ class RelationshipCalculator(gramps.gen.relationship.RelationshipCalculator):
|
||||
rel_str = "la nièce lointaine%s (%dème génération)" % \
|
||||
(inlaw, Gb)
|
||||
elif gender_b == Person.UNKNOWN:
|
||||
rel_str = get_sibling_unknown(inlaw)
|
||||
rel_str = get_sibling_unknown(Ga, inlaw)
|
||||
else:
|
||||
return rel_str
|
||||
elif Ga == Gb:
|
||||
@ -686,7 +686,7 @@ class RelationshipCalculator(gramps.gen.relationship.RelationshipCalculator):
|
||||
elif gender_b == Person.FEMALE:
|
||||
rel_str = get_cousine(Ga - 1, 0, inlaw=inlaw)
|
||||
elif gender_b == Person.UNKNOWN:
|
||||
rel_str = get_sibling_unknown(inlaw)
|
||||
rel_str = get_sibling_unknown(Ga, inlaw)
|
||||
else:
|
||||
return rel_str
|
||||
elif Ga > 1 and Ga > Gb:
|
||||
|
Loading…
Reference in New Issue
Block a user