mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-02 01:05:25 +02:00
Fix:Crash when updating book author or series that includes an apostrophe #2070
This commit is contained in:
parent
f1a7fd0d50
commit
ab97a9d613
2 changed files with 10 additions and 4 deletions
|
@ -105,11 +105,14 @@ class Series extends Model {
|
|||
static async getOldByNameAndLibrary(seriesName, libraryId) {
|
||||
const series = (await this.findOne({
|
||||
where: [
|
||||
literal(`name = '${seriesName}' COLLATE NOCASE`),
|
||||
literal(`name = ':seriesName' COLLATE NOCASE`),
|
||||
{
|
||||
libraryId
|
||||
}
|
||||
]
|
||||
],
|
||||
replacements: {
|
||||
seriesName
|
||||
}
|
||||
}))?.getOldSeries()
|
||||
return series
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue