Fix exception in device search

This commit is contained in:
Charles Haley 2010-05-26 22:49:34 +01:00
parent e4619e969c
commit a74df47c14

View File

@ -778,8 +778,10 @@ class OnDeviceSearch(SearchQueryParser): # {{{
q = {
'title' : lambda x : getattr(x, 'title').lower(),
'author': lambda x: ' & '.join(getattr(x, 'authors')).lower(),
'authors': lambda x: ' & '.join(getattr(x, 'authors')).lower(),
'collections':lambda x: ','.join(getattr(x, 'device_collections')).lower(),
'format':lambda x: os.path.splitext(x.path)[1].lower()
'format':lambda x: os.path.splitext(x.path)[1].lower(),
'formats':lambda x: os.path.splitext(x.path)[1].lower()
}
for index, row in enumerate(self.model.db):
for locvalue in locations: