From e9f5f8ea2ac5cc9a23513ac632d262bae56ba1c0 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 3 Oct 2013 07:23:01 +0530 Subject: [PATCH] Fix virtual libraries template function The virtual libraries template function was overriding the cache used for format_metadata in the ProxyMetadata object. --- src/calibre/db/lazy.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calibre/db/lazy.py b/src/calibre/db/lazy.py index 73260c8ae7..8935110b65 100644 --- a/src/calibre/db/lazy.py +++ b/src/calibre/db/lazy.py @@ -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 = {