Replace "get_note()" calls with "get_note_list()" in filters that use it.
svn: r8748
This commit is contained in:
parent
50fe8cb60b
commit
e3068f3185
@ -1,3 +1,10 @@
|
||||
2007-07-20 Brian Matherly <brian@gramps-project.org>
|
||||
* src/Filters/Rules/_HasNoteSubstrBase.py:
|
||||
* src/Filters/Rules/Person/_HasNoteMatchingSubstringOf.py:
|
||||
* src/Filters/Rules/Person/_HasNote.py:
|
||||
* src/Filters/Rules/_HasNoteRegexBase.py:
|
||||
Replace "get_note()" calls with "get_note_list()" in filters that use it.
|
||||
|
||||
2007-07-20 Brian Matherly <brian@gramps-project.org>
|
||||
* src/ToolTips.py (RepositoryTip:get_tip):
|
||||
* src/plugins/WriteGeneWeb.py (write_family, write_note_of_person):
|
||||
|
@ -45,4 +45,4 @@ class HasNote(Rule):
|
||||
category = _('General filters')
|
||||
|
||||
def apply(self,db,person):
|
||||
return bool(person.get_note())
|
||||
return bool(person.get_note_list())
|
||||
|
@ -46,7 +46,10 @@ class HasNoteMatchingSubstringOf(Rule):
|
||||
category = _('General filters')
|
||||
|
||||
def apply(self,db,person):
|
||||
n = person.get_note()
|
||||
if n:
|
||||
return n.upper().find(self.list[0].upper()) != -1
|
||||
notelist = person.get_note_list()
|
||||
for notehandle in notelist:
|
||||
note = db.get_note_from_handle(notehandle)
|
||||
n = note.get(False)
|
||||
if n.upper().find(self.list[0].upper()) != -1:
|
||||
return True
|
||||
return False
|
||||
|
@ -56,5 +56,10 @@ class HasNoteRegexBase(Rule):
|
||||
self.match = re.compile('')
|
||||
|
||||
def apply(self,db,person):
|
||||
n = unicode(person.get_note())
|
||||
return self.match.match(n) != None
|
||||
notelist = person.get_note_list()
|
||||
for notehandle in notelist:
|
||||
note = db.get_note_from_handle(notehandle)
|
||||
n = unicode(note.get(False))
|
||||
if self.match.match(n) != None:
|
||||
return True
|
||||
return False
|
||||
|
@ -46,7 +46,10 @@ class HasNoteSubstrBase(Rule):
|
||||
category = _('General filters')
|
||||
|
||||
def apply(self,db,person):
|
||||
n = unicode(person.get_note())
|
||||
if n:
|
||||
return n.upper().find(self.list[0].upper()) != -1
|
||||
notelist = person.get_note_list()
|
||||
for notehandle in notelist:
|
||||
note = db.get_note_from_handle(notehandle)
|
||||
n = unicode(note.get(False))
|
||||
if n.upper().find(self.list[0].upper()) != -1:
|
||||
return True
|
||||
return False
|
||||
|
Loading…
Reference in New Issue
Block a user