mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-11-13 12:23:34 +01:00
Add ignoreDuplicates for bookAuthor when renaming to respect unique index
This commit is contained in:
1 parent
2d0a5462d2
commit
c97b36e11c
1 file changed
+1
-1
@@ -149,7 +149,7 @@ class AuthorController {
|
||||
})
|
||||
if (libraryItems.length) {
|
||||
await Database.bookAuthorModel.removeByIds(req.author.id) // Remove all old BookAuthor
|
||||
await Database.bookAuthorModel.bulkCreate(bookAuthorsToCreate) // Create all new BookAuthor
|
||||
await Database.bookAuthorModel.bulkCreate(bookAuthorsToCreate, { ignoreDuplicates: true }) // Create all new unique BookAuthor
|
||||
for (const libraryItem of libraryItems) {
|
||||
await libraryItem.saveMetadataFile()
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user