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
This commit is contained in:
Arunesh Dwivedi 2026-06-02 11:35:11 +00:00
parent e70e4b9d40
commit a63dbfa5ff

View file

@ -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
}
})