From e529f281bc4905141765e26b70403f5b02a6664d Mon Sep 17 00:00:00 2001 From: Pranav C Date: Sun, 17 Aug 2025 07:12:50 +0000 Subject: [PATCH] fix: apply condition check for prev data in bulk operation --- packages/nocodb/src/helpers/webhookHelpers.ts | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/packages/nocodb/src/helpers/webhookHelpers.ts b/packages/nocodb/src/helpers/webhookHelpers.ts index b6e69d2307..d91df7cfbb 100644 --- a/packages/nocodb/src/helpers/webhookHelpers.ts +++ b/packages/nocodb/src/helpers/webhookHelpers.ts @@ -735,18 +735,19 @@ export async function invokeWebhook( for (let i = 0; i < newData.length; i++) { const data = newData[i]; - // disable until we have a way to extract prevData for bulk operations - // const pData = prevData[i] ? prevData[i] : null; - // - // // if condition is satisfied for prevData then return - // // if filters are not defined then skip the check - // if ( - // pData && - // filters.length && - // (await validateCondition(filters, pData)) - // ) { - // continue; - // } + const pData = prevData[i] ? prevData[i] : null; + + // if condition is satisfied for prevData then return + // if filters are not defined then skip the check + if ( + pData && + filters.length && + (await validateCondition(context, filters, pData, { + client: source?.type, + })) + ) { + continue; + } if ( await validateCondition(