Oops, fix manually NC condition!
Oops, we weren't doing a good job encapsulating the different conditions in item search. The `OR` in the NC condition was causing a precedence problem!
Now, we wrap all the conditions in parens at the interpolation site, to make it really clear that they all need to be made safe like that!
Now, there's not a bunch of "??????" entries in NC search, oops 😅
This commit is contained in:
parent
927401fc92
commit
535abec228
1 changed files with 3 additions and 4 deletions
|
@ -339,10 +339,9 @@ const buildItemSearchLoader = (db, loaders) =>
|
|||
`;
|
||||
|
||||
const queryConditions = `
|
||||
${matcherPlaceholders} AND t.locale = "en" AND
|
||||
${bodyIdCondition} AND
|
||||
${zoneIdsCondition} AND ${itemKindCondition} AND
|
||||
${currentUserCondition}
|
||||
(${matcherPlaceholders}) AND t.locale = "en" AND
|
||||
(${bodyIdCondition}) AND (${zoneIdsCondition}) AND
|
||||
(${itemKindCondition}) AND (${currentUserCondition})
|
||||
`;
|
||||
const queryConditionValues = [
|
||||
...wordMatchersForMysql,
|
||||
|
|
Loading…
Reference in a new issue