* src/plugins/Check.py (CheckIntegrity.check_parent_relationships):
More complete checks handling unknown genders * src/PeopleView.py: Check for null iters before removing from the tree store. svn: r2555
This commit is contained in:
parent
d2cec36c25
commit
fa0ccf779a
@ -214,22 +214,31 @@ class CheckIntegrity:
|
||||
mother = family.getMother()
|
||||
type = family.getRelationship()
|
||||
|
||||
if father == None or mother == None:
|
||||
if not father and not mother:
|
||||
continue
|
||||
elif father == None:
|
||||
if mother.getGender() == RelLib.Person.male:
|
||||
family.setFather(mother)
|
||||
family.setMother(None)
|
||||
elif mother == None:
|
||||
if father.getGender() == RelLib.Person.female:
|
||||
family.setMother(father)
|
||||
family.setFather(None)
|
||||
else:
|
||||
fgender = father.getGender()
|
||||
mgender = mother.getGender()
|
||||
if type != "Partners":
|
||||
if father.getGender() == mother.getGender():
|
||||
if fgender == mgender and fgender != RelLib.Person.unknown:
|
||||
family.setRelationship("Partners")
|
||||
self.fam_rel.append(family)
|
||||
elif father.getGender() == RelLib.Person.female or \
|
||||
mother.getGender() == RelLib.Person.male:
|
||||
elif fgender == RelLib.Person.female or mgender == RelLib.Person.male:
|
||||
family.setFather(mother)
|
||||
family.setMother(father)
|
||||
self.fam_rel.append(family)
|
||||
else:
|
||||
if father.getGender() != mother.getGender():
|
||||
elif fgender != mgender:
|
||||
family.setRelationship("Unknown")
|
||||
self.fam_rel.append(family)
|
||||
if father.getGender() == RelLib.Person.female:
|
||||
if fgender == RelLib.Person.female or mgender == RelLib.Person.male:
|
||||
family.setFather(mother)
|
||||
family.setMother(father)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user