From d8ff047cb970afffb08082f60d689e77056bd162 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 30 Jan 2019 09:26:44 +0530 Subject: [PATCH] Content server: Fix editing metadata that affects multiple books causing all the metadata for all the books to become the same. Fixes #1812781 [400 bad request from server API](https://bugs.launchpad.net/calibre/+bug/1812781) --- src/calibre/srv/cdb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/srv/cdb.py b/src/calibre/srv/cdb.py index 6e69357efe..7f2cf13d0a 100644 --- a/src/calibre/srv/cdb.py +++ b/src/calibre/srv/cdb.py @@ -175,7 +175,7 @@ def cdb_set_fields(ctx, rd, book_id, library_id): ctx.notify_changes(db.backend.library_path, metadata(dirtied)) all_ids = dirtied if all_dirtied else (dirtied & loaded_book_ids) all_ids |= {book_id} - return {bid: book_as_json(db, book_id) for bid in all_ids} + return {bid: book_as_json(db, bid) for bid in all_ids} @endpoint('/cdb/copy-to-library/{target_library_id}/{library_id=None}', needs_db_write=True,