From 4728c65c139414ae60430f50d370ebfff00b88e5 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Sat, 1 Apr 2023 18:33:31 +0800 Subject: [PATCH] fix(nocodb): fix test hook flag --- packages/nocodb/src/lib/meta/helpers/webhookHelpers.ts | 5 +++-- packages/nocodb/src/lib/services/hook.svc.ts | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/nocodb/src/lib/meta/helpers/webhookHelpers.ts b/packages/nocodb/src/lib/meta/helpers/webhookHelpers.ts index f382c5cd5f..426a9e46c2 100644 --- a/packages/nocodb/src/lib/meta/helpers/webhookHelpers.ts +++ b/packages/nocodb/src/lib/meta/helpers/webhookHelpers.ts @@ -252,7 +252,8 @@ export async function invokeWebhook( newData, user, testFilters = null, - throwErrorOnFailure = false + throwErrorOnFailure = false, + testHook = false ) { let hookLog: HookLogType; const startTime = process.hrtime(); @@ -413,7 +414,7 @@ export async function invokeWebhook( hookLog.execution_time = parseHrtimeToMilliSeconds( process.hrtime(startTime) ); - HookLog.insert({ ...hookLog, test_call: !!testFilters }); + HookLog.insert({ ...hookLog, test_call: testHook }); } } } diff --git a/packages/nocodb/src/lib/services/hook.svc.ts b/packages/nocodb/src/lib/services/hook.svc.ts index c5a7c52a9a..7e61419d69 100644 --- a/packages/nocodb/src/lib/services/hook.svc.ts +++ b/packages/nocodb/src/lib/services/hook.svc.ts @@ -96,6 +96,7 @@ export async function hookTest(param: { data, user, (hook as any)?.filters, + true, true ); } catch (e) {