mirror of
https://github.com/nocodb/nocodb.git
synced 2026-04-24 19:35:10 +00:00
Merge pull request #12115 from nocodb/nc-fix/webhook-condition-bulk-op
fix: Apply condition check for prev data in bulk operation hook
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user