From 4c1d505b68639fca4bf70935b814bb0498eacf94 Mon Sep 17 00:00:00 2001 From: Charles Haley <> Date: Wed, 19 Oct 2011 07:58:47 +0200 Subject: [PATCH] Do not load the user template functions for second DBs --- src/calibre/library/database2.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/calibre/library/database2.py b/src/calibre/library/database2.py index 0c27cc6b0e..9c08e78011 100644 --- a/src/calibre/library/database2.py +++ b/src/calibre/library/database2.py @@ -302,7 +302,8 @@ class LibraryDatabase2(LibraryDatabase, SchemaUpgrade, CustomColumns): if cats_changed: self.prefs.set('user_categories', user_cats) - load_user_template_functions(self.prefs.get('user_template_functions', [])) + if not self.is_second_db: + load_user_template_functions(self.prefs.get('user_template_functions', [])) self.conn.executescript(''' DROP TRIGGER IF EXISTS author_insert_trg;