diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index eda8dfeaf..fd01d204e 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,7 @@ +2006-12-13 Martin Hawlisch + * src/Filters/Rules/Person/_HasRelationship.py: Fix FamilyRelType + comparison (closes #758) + 2006-12-12 Alex Roitman * src/ViewManager.py (about): Only displaye translator credits when they exist. diff --git a/gramps2/src/Filters/Rules/Person/_HasRelationship.py b/gramps2/src/Filters/Rules/Person/_HasRelationship.py index 2b8e78fc3..0d4cbf1d4 100644 --- a/gramps2/src/Filters/Rules/Person/_HasRelationship.py +++ b/gramps2/src/Filters/Rules/Person/_HasRelationship.py @@ -33,6 +33,7 @@ from gettext import gettext as _ # #------------------------------------------------------------------------- from Filters.Rules._Rule import Rule +from RelLib import FamilyRelType #------------------------------------------------------------------------- # @@ -53,12 +54,15 @@ class HasRelationship(Rule): rel_type = 0 cnt = 0 num_rel = len(person.get_family_handle_list()) + if self.list[1]: + specified_type = FamilyRelType() + specified_type.set_from_xml_str(self.list[1]) # count children and look for a relationship type match for f_id in person.get_family_handle_list(): f = db.get_family_from_handle(f_id) cnt = cnt + len(f.get_child_ref_list()) - if self.list[1] and int(self.list[1]) == f.get_relationship(): + if self.list[1] and specified_type == f.get_relationship(): rel_type = 1 # if number of relations specified