svn: r3455
This commit is contained in:
Alex Roitman 2004-08-21 03:31:51 +00:00
parent 400f7d51b2
commit 72b301338f
9 changed files with 22 additions and 8 deletions

View File

@ -144,7 +144,7 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
if orig_person == None:
return ("undefined",[])
if orig_person == other_person:
if orig_person.get_handle() == other_person.get_handle():
return ('', [])
if self.is_spouse(orig_person,other_person):

View File

@ -335,7 +335,7 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
if orig_person == None:
return ("undefined",[])
if orig_person == other_person:
if orig_person.get_handle() == other_person.get_handle():
return ('', [])
if self.is_spouse(orig_person,other_person):

View File

@ -179,7 +179,7 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
if orig_person == None:
return ("undefined",[])
if orig_person == other_person:
if orig_person.get_handle() == other_person.get_handle():
return ('', [])
if self.is_spouse(orig_person,other_person):

View File

@ -143,7 +143,7 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
if orig_person == None:
return ("undefined",[])
if orig_person == other_person:
if orig_person.get_handle() == other_person.get_handle():
return ('', [])
if self.is_spouse(orig_person,other_person):

View File

@ -262,6 +262,20 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
along with a list of common ancestors (typically father,mother)
"""
if orig_person == None:
return ("undefined",[])
if orig_person.get_handle() == other_person.get_handle():
return ('', [])
if self.is_spouse(orig_person,other_person):
if other_person.get_gender() == RelLib.Person.male:
#FIXME: husband
return ("spouse",[])
else:
#FIXME: wife
return ("spouse",[])
if self.is_fathermother_in_law(other_person,orig_person):
if other_person.getGender() == RelLib.Person.male:
return ("apósa",self.get_fathermother_in_law_common(other_person,orig_person))

View File

@ -148,7 +148,7 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
if orig_person == None:
return ("non definito",[])
if orig_person == other_person:
if orig_person.get_handle() == other_person.get_handle():
return ('', [])
if self.is_spouse(orig_person,other_person):

View File

@ -229,7 +229,7 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
if orig_person == None:
return ("undefined",[])
if orig_person == other_person:
if orig_person.get_handle() == other_person.get_handle():
return ('', [])
if self.is_spouse(orig_person,other_person):

View File

@ -204,7 +204,7 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
if orig_person == None:
return ("undefined",[])
if orig_person == other_person:
if orig_person.get_handle() == other_person.get_handle():
return ('', [])
if self.is_spouse(orig_person,other_person):

View File

@ -184,7 +184,7 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
if orig_person == None:
return ("undefined",[])
if orig_person == other_person:
if orig_person.get_handle() == other_person.get_handle():
return ('', [])
if self.is_spouse(orig_person,other_person):