1
0
Fork 0
mirror of synced 2024-08-23 05:51:29 +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
return JSON.stringify([processString(filterValue)])
wrapper = (s: string) => JSON.stringify([s])
}
if (isArray) {
return filterValue.map(el => {
if (typeof el === "string") {
return processString(el)
return wrapper(processString(el))
} else {
return el
}
})
} else {
return processString(filterValue)
return wrapper(processString(filterValue))
}
})
}