Simplify Conditionals
svn: r644
This commit is contained in:
parent
5903598e7b
commit
c52457bc89
@ -119,9 +119,7 @@ class SelectChild:
|
|||||||
person_list = []
|
person_list = []
|
||||||
for person in self.db.getPersonMap().values():
|
for person in self.db.getPersonMap().values():
|
||||||
if filter:
|
if filter:
|
||||||
if person in slist:
|
if person in slist or person.getMainFamily():
|
||||||
continue
|
|
||||||
if person.getMainFamily() != None:
|
|
||||||
continue
|
continue
|
||||||
|
|
||||||
pdday = person.getDeath().getDateObj()
|
pdday = person.getDeath().getDateObj()
|
||||||
@ -129,7 +127,6 @@ class SelectChild:
|
|||||||
|
|
||||||
if bday.getYearValid():
|
if bday.getYearValid():
|
||||||
if pbday.getYearValid():
|
if pbday.getYearValid():
|
||||||
|
|
||||||
# reject if child birthdate < parents birthdate + 10
|
# reject if child birthdate < parents birthdate + 10
|
||||||
if pbday.getLowYear() < bday.getHighYear()+10:
|
if pbday.getLowYear() < bday.getHighYear()+10:
|
||||||
continue
|
continue
|
||||||
@ -145,13 +142,11 @@ class SelectChild:
|
|||||||
|
|
||||||
if dday.getYearValid():
|
if dday.getYearValid():
|
||||||
if pbday.getYearValid():
|
if pbday.getYearValid():
|
||||||
|
|
||||||
# reject if childs birth date > parents deathday + 3
|
# reject if childs birth date > parents deathday + 3
|
||||||
if pdday.getLowYear() > dday.getHighYear()+3:
|
if pdday.getLowYear() > dday.getHighYear()+3:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if pdday.getYearValid():
|
if pdday.getYearValid():
|
||||||
|
|
||||||
# reject if childs death date > parents deathday + 150
|
# reject if childs death date > parents deathday + 150
|
||||||
if pbday.getLowYear() > dday.getHighYear() + 150:
|
if pbday.getLowYear() > dday.getHighYear() + 150:
|
||||||
continue
|
continue
|
||||||
|
Loading…
Reference in New Issue
Block a user