From 6e0da3bf7a7b81893dbcca542519cf594d7d3232 Mon Sep 17 00:00:00 2001 From: advplyr Date: Sat, 21 Feb 2026 16:00:38 -0600 Subject: [PATCH] Fix updating author name merging with same name authors in a different library #4628 --- server/controllers/AuthorController.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/controllers/AuthorController.js b/server/controllers/AuthorController.js index 50eeda31a..82ed3e50a 100644 --- a/server/controllers/AuthorController.js +++ b/server/controllers/AuthorController.js @@ -113,7 +113,7 @@ class AuthorController { payload.lastFirst = Database.authorModel.getLastFirst(payload.name) } - // Check if author name matches another author and merge the authors + // Check if author name matches another author in the same library and merge the authors let existingAuthor = null if (authorNameUpdate) { existingAuthor = await Database.authorModel.findOne({ @@ -121,7 +121,8 @@ class AuthorController { id: { [sequelize.Op.not]: req.author.id }, - name: payload.name + name: payload.name, + libraryId: req.author.libraryId } }) }