From 20817c399218fff5555e800ad40b4303d0b47213 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 28 Aug 2013 10:17:49 +0530 Subject: [PATCH] ... --- src/calibre/db/cache.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/db/cache.py b/src/calibre/db/cache.py index 9551a2b434..dbc28a4200 100644 --- a/src/calibre/db/cache.py +++ b/src/calibre/db/cache.py @@ -822,7 +822,7 @@ class Cache(object): get_metadata, lang_map, all_book_ids) except KeyError: if field == 'id': - ans = {bid:bid for bid in ids_to_sort} + ans = {bid:bid for bid in all_book_ids} else: ans = virtual_fields[fm.get(field, field)].sort_keys_for_books( get_metadata, lang_map, all_book_ids)