1
0
Fork 0
mirror of synced 2024-09-18 10:20:11 +12:00

Fix filter operations

This commit is contained in:
Adria Navarro 2024-05-13 11:44:55 +02:00
parent 5c8a789047
commit fdea7221e4

View file

@ -71,21 +71,22 @@ function userColumnMapping(
} }
} }
if (isDeprecatedSingleUserColumn && filterValue && isString && isSql) { let wrapper = (s: string) => s
if (isDeprecatedSingleUserColumn && filterValue && isSql) {
// Decreated single users are stored as stringified arrays of a single value // Decreated single users are stored as stringified arrays of a single value
return JSON.stringify([processString(filterValue)]) wrapper = (s: string) => JSON.stringify([s])
} }
if (isArray) { if (isArray) {
return filterValue.map(el => { return filterValue.map(el => {
if (typeof el === "string") { if (typeof el === "string") {
return processString(el) return wrapper(processString(el))
} else { } else {
return el return el
} }
}) })
} else { } else {
return processString(filterValue) return wrapper(processString(filterValue))
} }
}) })
} }