* src/GenericFilter.py (IsSpouseOfFilterMatch) Call prepare for recursive filter
svn: r5438
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
2005-11-25 Martin Hawlisch <Martin.Hawlisch@gmx.de>
|
2005-11-25 Martin Hawlisch <Martin.Hawlisch@gmx.de>
|
||||||
* src/GenericFilter.py (HasCommonAncestorWith): Catch no longer existing person
|
* src/GenericFilter.py (HasCommonAncestorWith): Catch no longer
|
||||||
|
existing person; (IsSpouseOfFilterMatch) Call prepare for recursive
|
||||||
|
filter
|
||||||
|
|
||||||
2005-11-24 Don Allingham <don@gramps-project.org>
|
2005-11-24 Don Allingham <don@gramps-project.org>
|
||||||
* src/po/template.po: updated translation file
|
* src/po/template.po: updated translation file
|
||||||
|
|||||||
@@ -1409,8 +1409,11 @@ class IsSpouseOfFilterMatch(Rule):
|
|||||||
description = _("Matches people married to anybody matching a filter")
|
description = _("Matches people married to anybody matching a filter")
|
||||||
category = _('Family filters')
|
category = _('Family filters')
|
||||||
|
|
||||||
|
def prepare(self,db):
|
||||||
|
self.filt = MatchesFilter (self.list)
|
||||||
|
self.filt.prepare(db)
|
||||||
|
|
||||||
def apply(self,db,person):
|
def apply(self,db,person):
|
||||||
filt = MatchesFilter (self.list)
|
|
||||||
for family_handle in person.get_family_handle_list ():
|
for family_handle in person.get_family_handle_list ():
|
||||||
family = db.get_family_from_handle(family_handle)
|
family = db.get_family_from_handle(family_handle)
|
||||||
for spouse_id in [family.get_father_handle (), family.get_mother_handle ()]:
|
for spouse_id in [family.get_father_handle (), family.get_mother_handle ()]:
|
||||||
@@ -1418,7 +1421,7 @@ class IsSpouseOfFilterMatch(Rule):
|
|||||||
continue
|
continue
|
||||||
if spouse_id == person.handle:
|
if spouse_id == person.handle:
|
||||||
continue
|
continue
|
||||||
if filt.apply (db, db.get_person_from_handle( spouse_id)):
|
if self.filt.apply (db, db.get_person_from_handle( spouse_id)):
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user