mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix error when user_categories not present
This commit is contained in:
parent
d16c51bedf
commit
645c3d8269
@ -369,7 +369,7 @@ class Cache(object):
|
|||||||
|
|
||||||
user_cat_vals = {}
|
user_cat_vals = {}
|
||||||
if get_user_categories:
|
if get_user_categories:
|
||||||
user_cats = self.backend.prefs['user_categories']
|
user_cats = self._pref('user_categories', {})
|
||||||
for ucat in user_cats:
|
for ucat in user_cats:
|
||||||
res = []
|
res = []
|
||||||
for name,cat,ign in user_cats[ucat]:
|
for name,cat,ign in user_cats[ucat]:
|
||||||
@ -2289,7 +2289,7 @@ class Cache(object):
|
|||||||
It should be a mapping of book_ids to their corresponding ProxyMetadata
|
It should be a mapping of book_ids to their corresponding ProxyMetadata
|
||||||
objects.
|
objects.
|
||||||
'''
|
'''
|
||||||
user_cats = self.backend.prefs['user_categories']
|
user_cats = self._pref('user_categories', {})
|
||||||
pmm = proxy_metadata_map or {}
|
pmm = proxy_metadata_map or {}
|
||||||
ans = {}
|
ans = {}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user