From f12108aaf11c3f114a7a3bfcd8c2729c8aa20309 Mon Sep 17 00:00:00 2001 From: "m.lettere" Date: Thu, 25 Nov 2021 11:30:30 +0100 Subject: [PATCH] fixing validation --- templates/enable_workspace_clients_for_context.json.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/enable_workspace_clients_for_context.json.j2 b/templates/enable_workspace_clients_for_context.json.j2 index f3dd800..1e6e249 100644 --- a/templates/enable_workspace_clients_for_context.json.j2 +++ b/templates/enable_workspace_clients_for_context.json.j2 @@ -18,7 +18,7 @@ "id" : "${workflow.input.client_id}", "ctx" : "${workflow.input.context}", "filter" : "${workflow.input.filter}", - "scriptExpression": "function e(v){ return (v == null || (v.trim && v.trim() === ''))}; if(e($.ctx)) throw('Context must not be empty'); f=$.filter; if(e(f)) f = []; else if(!(f instanceof Array)) throw('Filter must be empty or Array'); return { encoded_root_vo : encodeURI($.root_vo), filter : f}" + "scriptExpression": "function e(v){ return (v == null || (v.trim && v.trim() === ''))}; if(e($.ctx)) throw('Context must not be empty'); f=$.filter; if(e(f)) f = []; else if(f instanceof String)) f=[f]; return { encoded_root_vo : encodeURI($.root_vo), filter : Java.to(f,'java.lang.String[]')}" } } ]