From ed129d118708501b0ac4b8a1359d49c5772cb02e Mon Sep 17 00:00:00 2001 From: Charles Haley Date: Tue, 17 Nov 2015 10:48:27 +0100 Subject: [PATCH] bug #1516880: composite column definitions not copied when books are copied between libraries. Note that because the templates can vary, there is no guarantee that composite column A in library 1 will produce the same answer as column A in library 2. --- src/calibre/gui2/actions/copy_to_library.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/calibre/gui2/actions/copy_to_library.py b/src/calibre/gui2/actions/copy_to_library.py index 012f4773b5..9b28920216 100644 --- a/src/calibre/gui2/actions/copy_to_library.py +++ b/src/calibre/gui2/actions/copy_to_library.py @@ -432,11 +432,12 @@ class CopyToLibraryAction(InterfaceAction): incompatible_columns = [] missing_columns = [] for k, m in db.field_metadata.custom_iteritems(): - if m['datatype'] == 'composite': - continue if k not in newdb_meta: missing_columns.append(k) elif not self._column_is_compatible(m, newdb_meta[k]): + # Note that composite columns are always assumed to be + # compatible. No attempt is made to copy the template + # from the source to the destination. incompatible_columns.append(k) if missing_columns or incompatible_columns: