Browse Source

fix: add toLowerCase() to pt?.arguments[1]?.value

pull/2706/head
Wing-Kam Wong 2 years ago
parent
commit
9a17417127
  1. 2
      packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/functionMappings/mysql.ts

2
packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/functionMappings/mysql.ts

@ -66,7 +66,7 @@ const mysql2 = {
saturday: 5, saturday: 5,
sunday: 6, sunday: 6,
}; };
const offset = m[pt?.arguments[1]?.value] || 0; const offset = m[pt?.arguments[1]?.value.toLowerCase()] || 0;
return knex.raw( return knex.raw(
`CASE `CASE
WHEN WEEKDAY(${fn(pt.arguments[0])}) >= ${offset} THEN WHEN WEEKDAY(${fn(pt.arguments[0])}) >= ${offset} THEN

Loading…
Cancel
Save