From 8889b07677895ab373bffd510c945d16324bb0ac Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Wed, 26 Apr 2023 11:44:31 -0700 Subject: [PATCH] Fixed a bug with doc level trigger creation. See issue 448 for more details. (#513) (#522) Signed-off-by: AWSHurneyt (cherry picked from commit 45ea4b9e11379bdeb852973dc4f273aed033fb49) Co-authored-by: AWSHurneyt --- .../containers/CreateTrigger/utils/formikToTrigger.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/public/pages/CreateTrigger/containers/CreateTrigger/utils/formikToTrigger.js b/public/pages/CreateTrigger/containers/CreateTrigger/utils/formikToTrigger.js index 299ba6ee6..e6374ed08 100644 --- a/public/pages/CreateTrigger/containers/CreateTrigger/utils/formikToTrigger.js +++ b/public/pages/CreateTrigger/containers/CreateTrigger/utils/formikToTrigger.js @@ -108,8 +108,7 @@ export function getDocumentLevelScriptSource(conditions) { } if (!_.isEmpty(query) && !_.isEmpty(query.queryName)) { const queryExpression = _.get(query, 'expression'); - const operator = query.operator === '!=' ? '!' : ''; - scriptSourceContents.push(`${operator}query[${queryExpression}]`); + scriptSourceContents.push(`query[${queryExpression}]`); } }); return scriptSourceContents.join(' ');