* src/Filters/Rules/_HasNoteSubstrBase.py (apply): Enforce unicode.

* src/Filters/Rules/_HasNoteRegexBase.py (apply): Enforce unicode.


svn: r7148
This commit is contained in:
Alex Roitman 2006-08-10 01:07:47 +00:00
parent b19d9eaecb
commit d00a9f504d
3 changed files with 4 additions and 2 deletions

View File

@ -1,4 +1,6 @@
2006-08-09 Alex Roitman <shura@gramps-project.org>
* src/Filters/Rules/_HasNoteSubstrBase.py (apply): Enforce unicode.
* src/Filters/Rules/_HasNoteRegexBase.py (apply): Enforce unicode.
* src/DataViews/_PlaceView.py: Add filter sidebar.
* src/FilterEditor/_ShowResults.py: Support media filters.
* src/FilterEditor/_EditRule.py: Support media filters.

View File

@ -56,5 +56,5 @@ class HasNoteRegexBase(Rule):
self.match = re.compile('')
def apply(self,db,person):
n = person.get_note()
n = unicode(person.get_note())
return self.match.match(n) != None

View File

@ -46,7 +46,7 @@ class HasNoteSubstrBase(Rule):
category = _('General filters')
def apply(self,db,person):
n = person.get_note()
n = unicode(person.get_note())
if n:
return n.upper().find(self.list[0].upper()) != -1
return False