mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-07 09:51:37 +00:00
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:
parent
193aa02994
commit
8e7f5bd15a
1 changed files with 3 additions and 1 deletions
|
|
@ -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
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue