diff --git a/src/calibre/db/cache.py b/src/calibre/db/cache.py index c606db1b85..59e5c34cdd 100644 --- a/src/calibre/db/cache.py +++ b/src/calibre/db/cache.py @@ -1634,7 +1634,7 @@ class Cache(object): @write_api def create_custom_column(self, label, name, datatype, is_multiple, editable=True, display={}): - self.backend.create_custom_column(label, name, datatype, is_multiple, editable=editable, display=display) + return self.backend.create_custom_column(label, name, datatype, is_multiple, editable=editable, display=display) @write_api def set_custom_column_metadata(self, num, name=None, label=None, is_editable=None, diff --git a/src/calibre/library/cli.py b/src/calibre/library/cli.py index 08775a9138..69e4bc811f 100644 --- a/src/calibre/library/cli.py +++ b/src/calibre/library/cli.py @@ -719,7 +719,7 @@ def command_export(args, dbpath): def do_add_custom_column(db, label, name, datatype, is_multiple, display): num = db.create_custom_column(label, name, datatype, is_multiple, display=display) - prints('Custom column created with id: %d'%num) + prints('Custom column created with id: %s'%num) def add_custom_column_option_parser(): from calibre.library.custom_columns import CustomColumns