Fix conversion error when book list is filtered before conversion completes

This commit is contained in:
Kovid Goyal 2009-01-20 23:22:14 -08:00
parent fb64ef80fc
commit 7e00391f59

View File

@ -224,9 +224,17 @@ class ResultCache(SearchQueryParser):
return False
def refresh_ids(self, conn, ids):
'''
Refresh the data in the cache for books identified by ids.
Returns a list of affected rows or None if the rows are filtered.
'''
for id in ids:
self._data[id] = conn.get('SELECT * from meta WHERE id=?', (id,))[0]
return map(self.row, ids)
try:
return map(self.row, ids)
except ValueError:
pass
return None
def books_added(self, ids, conn):
if not ids: