From 8e7f5bd15a70adf453ff88ba3e05b4aa0fd386e7 Mon Sep 17 00:00:00 2001 From: Arunesh Dwivedi Date: Tue, 2 Jun 2026 11:35:11 +0000 Subject: [PATCH] fix: case-insensitive author merge check on rename When renaming an author from e.g. 'max' to 'Max', the merge check now uses case-insensitive comparison (Op.iLike) instead of exact match. Previously, if an author named 'Max' already existed, renaming 'max' to 'Max' would not find the existing author because the comparison was case-sensitive. This caused duplicate authors with the same name but different cases. Fixes #5278 --- server/controllers/AuthorController.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/controllers/AuthorController.js b/server/controllers/AuthorController.js index 8c2e80aec..a5a2d1284 100644 --- a/server/controllers/AuthorController.js +++ b/server/controllers/AuthorController.js @@ -121,7 +121,9 @@ class AuthorController { id: { [sequelize.Op.not]: req.author.id }, - name: payload.name, + name: { + [sequelize.Op.iLike]: payload.name + }, libraryId: req.author.libraryId } })