mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-06 06:48:21 +00:00
fix: Handle params in trigger function to support non-array input (#13257)
This commit is contained in:
parent
563c354248
commit
1285779eca
3 changed files with 4 additions and 3 deletions
|
|
@ -1 +1 @@
|
|||
Subproject commit 456b2efaf22fc04176dc371337785ae03c050b5b
|
||||
Subproject commit 26b1d66b054eb56eeb1f442c0b91d0d34ed7ebb3
|
||||
|
|
@ -557,7 +557,6 @@ export const createQueryPanelSlice = (set, get) => ({
|
|||
} else if (query.kind === 'workflows') {
|
||||
queryExecutionPromise = triggerWorkflow(
|
||||
moduleId,
|
||||
query,
|
||||
query.options?.workflowId,
|
||||
query.options?.blocking,
|
||||
query.options?.params,
|
||||
|
|
|
|||
|
|
@ -97,7 +97,9 @@ function trigger(workflowAppId, params, environmentId) {
|
|||
appId: workflowAppId,
|
||||
userId: currentSession.current_user?.id,
|
||||
executeUsing: 'app',
|
||||
params: Object.fromEntries(params.filter((param) => param.key !== '').map((param) => [param.key, param.value])),
|
||||
params: Array.isArray(params)
|
||||
? Object.fromEntries(params.filter((param) => param.key !== '').map((param) => [param.key, param.value]))
|
||||
: params || {},
|
||||
environmentId,
|
||||
};
|
||||
const requestOptions = { method: 'POST', headers: authHeader(), body: JSON.stringify(body), credentials: 'include' };
|
||||
|
|
|
|||
Loading…
Reference in a new issue