mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 18:23:47 +02:00
Fix virtual libraries template function
The virtual libraries template function was overriding the cache used for format_metadata in the ProxyMetadata object.
This commit is contained in:
parent
8920cf6cae
commit
e9f5f8ea2a
1 changed files with 2 additions and 2 deletions
|
|
@ -234,11 +234,11 @@ def composite_getter(mi, field, metadata, book_id, cache, formatter, template_ca
|
|||
|
||||
def virtual_libraries_getter(dbref, book_id, cache):
|
||||
try:
|
||||
return cache[field]
|
||||
return cache['virtual_libraries']
|
||||
except KeyError:
|
||||
db = dbref()
|
||||
vls = db.virtual_libraries_for_books((book_id,))[book_id]
|
||||
ret = cache[field] = ', '.join(vls)
|
||||
ret = cache['virtual_libraries'] = ', '.join(vls)
|
||||
return ret
|
||||
|
||||
getters = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue