From 43ffb556fdb1cd05165f22239c5a9b3f19786f51 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Fri, 4 Mar 2005 15:15:20 +0000 Subject: [PATCH] * src/GenericFilter.py (HasAttribute.apply): Make work when no value is given; (HasFamilyAttribute.apply): Make work when no value is given. svn: r4117 --- ChangeLog | 4 ++++ src/GenericFilter.py | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1460a54f4..d47ccd6f3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2005-03-04 Alex Roitman + * src/GenericFilter.py (HasAttribute.apply): Make work when no value + is given; (HasFamilyAttribute.apply): Make work when no value is given. + 2005-03-03 Alex Roitman * src/GenericFilter.py (HasAttribute.apply): Fix the rule. (HasFamilyAttribute.apply): Fix the rule. diff --git a/src/GenericFilter.py b/src/GenericFilter.py index 13977c229..ee4a20da0 100644 --- a/src/GenericFilter.py +++ b/src/GenericFilter.py @@ -1243,7 +1243,7 @@ class HasAttribute(Rule): p = db.get_person_from_handle(p_id) for attr in p.get_attribute_list(): name_match = self.list[0] == attr.get_type() - value_match = self.list[1] and\ + value_match = \ attr.get_value().upper().find(self.list[1].upper()) != -1 if name_match and value_match: return 1 @@ -1270,7 +1270,7 @@ class HasFamilyAttribute(Rule): f = db.get_family_from_handle(f_id) for attr in f.get_attribute_list(): name_match = self.list[0] == attr.get_type() - value_match = self.list[1] and\ + value_match = \ attr.get_value().upper().find(self.list[1].upper()) != -1 if name_match and value_match: return 1