mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 02:34:06 -04: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
@ -234,11 +234,11 @@ def composite_getter(mi, field, metadata, book_id, cache, formatter, template_ca
|
|||||||
|
|
||||||
def virtual_libraries_getter(dbref, book_id, cache):
|
def virtual_libraries_getter(dbref, book_id, cache):
|
||||||
try:
|
try:
|
||||||
return cache[field]
|
return cache['virtual_libraries']
|
||||||
except KeyError:
|
except KeyError:
|
||||||
db = dbref()
|
db = dbref()
|
||||||
vls = db.virtual_libraries_for_books((book_id,))[book_id]
|
vls = db.virtual_libraries_for_books((book_id,))[book_id]
|
||||||
ret = cache[field] = ', '.join(vls)
|
ret = cache['virtual_libraries'] = ', '.join(vls)
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
getters = {
|
getters = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user