HasNoteMatchingSubstringOf was loaded but not present on editor_rule_list
svn: r11261
This commit is contained in:
@@ -32,24 +32,13 @@ from gettext import gettext as _
|
|||||||
# GRAMPS modules
|
# GRAMPS modules
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
from Filters.Rules._Rule import Rule
|
from Filters.Rules._HasNoteSubstrBase import HasNoteSubstrBase
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
# "People having notes that contain a substring"
|
# "People having notes that contain a substring"
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
class HasNoteMatchingSubstringOf(Rule):
|
class HasNoteMatchingSubstringOf(HasNoteSubstrBase):
|
||||||
"""People having notes containing <subtring>"""
|
"""People having notes containing <subtring>"""
|
||||||
|
|
||||||
labels = [ _('Substring:')]
|
|
||||||
name = _('People having notes containing <substring>')
|
name = _('People having notes containing <substring>')
|
||||||
description = _("Matches people whose notes contain text matching a substring")
|
description = _("Matches people whose notes contain text matching a substring")
|
||||||
category = _('General filters')
|
|
||||||
|
|
||||||
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 n.upper().find(self.list[0].upper()) != -1:
|
|
||||||
return True
|
|
||||||
return False
|
|
||||||
|
@@ -165,6 +165,7 @@ editor_rule_list = [
|
|||||||
HasTextMatchingSubstringOf,
|
HasTextMatchingSubstringOf,
|
||||||
HasNote,
|
HasNote,
|
||||||
HasNoteRegexp,
|
HasNoteRegexp,
|
||||||
|
HasNoteMatchingSubstringOf,
|
||||||
RegExpIdOf,
|
RegExpIdOf,
|
||||||
Disconnected,
|
Disconnected,
|
||||||
]
|
]
|
||||||
|
Reference in New Issue
Block a user