Skip to content

Commit 708c263

Browse files
author
niemenX
committed
fix import/export
1 parent a23bcba commit 708c263

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

gql-bff/src/features/workflow/resolvers.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const workflowResolvers = {
4747

4848
exportWorkflows: async (
4949
_parent,
50-
{ workflowList, prefix, allHandlers },
50+
{ workflowList, prefix = '', allHandlers },
5151
context,
5252
_info
5353
) => {
@@ -62,7 +62,7 @@ const workflowResolvers = {
6262
if (workflowList.length === 0) {
6363
const allWorkflows = await dataSources.workflowApi.getWorkflowList();
6464
if (isMultiTenant) {
65-
const tenantPrefix = prefix.toUpperCase().startsWith(code.toUpperCase()) ? prefix : `${code.toUpperCase()}_${prefix.toUpperCase()}`;
65+
const tenantPrefix = prefix?.toUpperCase().startsWith(code.toUpperCase()) ? prefix : `${code.toUpperCase()}_${prefix?.toUpperCase()}`;
6666
const tenantFlows = filterResourcesByTenant(allWorkflows, tenant?.id);
6767
for (const flow of tenantFlows) {
6868
if (!flow.name.startsWith(tenantPrefix)){
@@ -141,7 +141,7 @@ const workflowResolvers = {
141141
//Add all handlers
142142
if (allHandlers) {
143143
if (isMultiTenant) {
144-
const tenantPrefix = prefix.toUpperCase().startsWith(code.toUpperCase()) ? prefix : `${code.toUpperCase()}_${prefix.toUpperCase()}`;
144+
const tenantPrefix = prefix?.toUpperCase().startsWith(code.toUpperCase()) ? prefix : `${code.toUpperCase()}_${prefix?.toUpperCase()}`;
145145
const tenantHandlers = filterEvHandlersByTenant(
146146
conductorHandlers,
147147
tenant?.id

0 commit comments

Comments
 (0)