* 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 72478cd4ce
commit 90aed6791f
3 changed files with 4 additions and 2 deletions

View File

@ -1,4 +1,6 @@
2006-08-09 Alex Roitman <shura@gramps-project.org> 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/DataViews/_PlaceView.py: Add filter sidebar.
* src/FilterEditor/_ShowResults.py: Support media filters. * src/FilterEditor/_ShowResults.py: Support media filters.
* src/FilterEditor/_EditRule.py: Support media filters. * src/FilterEditor/_EditRule.py: Support media filters.

View File

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

View File

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