fix error second/third cousin for RelCalc tool

svn: r9242
This commit is contained in:
Jérôme Rapinat 2007-10-24 16:56:31 +00:00
parent 4e902b6f7a
commit 44b0901bd7

View File

@ -88,9 +88,9 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
# de la personne active à l'ancêtre commun Ga=[level] pour le calculateur de relations
def get_cousin(self, level, removed):
if (removed/level) == 1 and ((level*3)-3)/(level-1) != 3:
if (removed/level) == 1 and ((level*3)-3)/(level-1) == 3:
return "le %s cousin" % (_level_name[level/2])
elif (removed/level) == 1 and ((level*3)-3)/(level-1) != 2:
elif (removed/level) == 1 and ((level*3)-3)/(level-1) == 2:
return "le %s cousin" % (_level_name[(level+1)/2])
elif (level) < (removed):
return "le grand-oncle éloigné, relié à la %s génération" % (_level_name[level+3])
@ -98,9 +98,9 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
return "le cousin éloigné, relié à la %s génération" % (_level_name[removed])
def get_cousine(self, level, removed):
if (removed/level) == 1 and ((level*3)-3)/(level-1) != 3:
if (removed/level) == 1 and ((level*3)-3)/(level-1) == 3:
return "la %s cousine" % (_level_name[level/2])
elif (removed/level) == 1 and ((level*3)-3)/(level-1) != 2:
elif (removed/level) == 1 and ((level*3)-3)/(level-1) == 2:
return "la %s cousine" % (_level_name[(level+1)/2])
elif (level) < (removed):
return "la grand-tante éloignée, reliée à la %s génération" % (_level_name[level+3])