fix: search by numeric numbers in a relation (#21873)

This commit is contained in:
Marc Roig 2024-10-16 13:19:38 +02:00 committed by GitHub
parent 4167026bc7
commit c823b10e98
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -451,7 +451,7 @@ const applyWhere = (qb: Knex.QueryBuilder, where: Where) => {
const fieldLowerFn = (qb: Knex.QueryBuilder) => {
// Postgres requires string to be passed
if (qb.client.config.client === 'postgres') {
if (qb.client.dialect === 'postgresql') {
return 'LOWER(CAST(?? AS VARCHAR))';
}