From c94c8c0b84bdfd944cff1c15bdcdd301e4697d4f Mon Sep 17 00:00:00 2001 From: Nick Hall Date: Tue, 13 Aug 2013 18:39:34 +0000 Subject: [PATCH] Fix bug in note filters svn: r22862 --- gramps/gen/filters/rules/_hasnoteregexbase.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/gramps/gen/filters/rules/_hasnoteregexbase.py b/gramps/gen/filters/rules/_hasnoteregexbase.py index f71af94fb..971ea9a36 100644 --- a/gramps/gen/filters/rules/_hasnoteregexbase.py +++ b/gramps/gen/filters/rules/_hasnoteregexbase.py @@ -50,10 +50,8 @@ class HasNoteRegexBase(Rule): allow_regex = True def apply(self, db, person): - notelist = person.get_note_list() - for notehandle in notelist: - note = db.get_note_from_handle(notehandle) - n = note.get() - if self.match_substring(0, n) is not None: + for handle in person.get_note_list(): + note = db.get_note_from_handle(handle) + if self.match_substring(0, note.get()): return True return False