diff --git a/server/postgres/src/storage.ts b/server/postgres/src/storage.ts index 2286109a4e..3fdb7d997d 100644 --- a/server/postgres/src/storage.ts +++ b/server/postgres/src/storage.ts @@ -1267,7 +1267,8 @@ abstract class PostgresAdapterBase implements DbAdapter { switch (type) { case 'common': if (Array.isArray(val) && val.includes(null)) { - res.push(`(${tkey} = ANY(${vars.addArray(val, inferType(val))})) OR ${tkey} IS NULL`) + const vv = vars.addArray(val, inferType(val)) + res.push(`(${tkey} = ANY(${vv}) OR ${tkey} IS NULL)`) } else { if (val.length > 0) { res.push(`${tkey} = ANY(${vars.addArray(val, inferType(val))})`)