retire unicode handling workaround for Author and Series title

This commit is contained in:
Oleg Ivasenko 2024-10-08 19:52:26 +00:00
parent 549f95b259
commit e6db1495ab
2 changed files with 2 additions and 4 deletions

View File

@ -1,6 +1,5 @@
const { DataTypes, Model, where, fn, col } = require('sequelize')
const parseNameString = require('../utils/parsers/parseNameString')
const { asciiOnlyToLowerCase } = require('../utils/index')
class Author extends Model {
constructor(values, options) {
@ -56,7 +55,7 @@ class Author extends Model {
static async getByNameAndLibrary(authorName, libraryId) {
return this.findOne({
where: [
where(fn('lower', col('name')), asciiOnlyToLowerCase(authorName)),
where(fn('lower', col('name')), authorName.toLowerCase()),
{
libraryId
}

View File

@ -1,7 +1,6 @@
const { DataTypes, Model, where, fn, col } = require('sequelize')
const { getTitlePrefixAtEnd } = require('../utils/index')
const { asciiOnlyToLowerCase } = require('../utils/index')
class Series extends Model {
constructor(values, options) {
@ -42,7 +41,7 @@ class Series extends Model {
static async getByNameAndLibrary(seriesName, libraryId) {
return this.findOne({
where: [
where(fn('lower', col('name')), asciiOnlyToLowerCase(seriesName)),
where(fn('lower', col('name')), seriesName.toLowerCase()),
{
libraryId
}