Skip to content

Commit

Permalink
Temp: merge with parkedParentSource commit
Browse files Browse the repository at this point in the history
  • Loading branch information
manelcecs committed Dec 26, 2023
1 parent d813008 commit c7d3ad3
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/domain-services/flows/flow-search-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -366,8 +366,14 @@ export class FlowSearchService {
databaseConnection: Knex,
filters: SearchFlowsArgs
): Promise<FlowSearchResult> {
const { limit, nextPageCursor, prevPageCursor, sortField, sortOrder } =
filters;
const {
limit,
nextPageCursor,
prevPageCursor,
sortField,
sortOrder,
includeChildrenOfParkedFlows: shouldIncludeChildrenOfParkedFlows,
} = filters;

const orderBy: FlowOrderBy = this.buildOrderBy(sortField, sortOrder);

Expand Down Expand Up @@ -499,7 +505,8 @@ export class FlowSearchService {

let parkedParentSource: FlowParkedParentSource | null = null;
const shouldLookAfterParentSource =
flow.activeStatus && flowLink.length > 0;
flowLink.length > 0 && shouldIncludeChildrenOfParkedFlows;

if (shouldLookAfterParentSource) {
parkedParentSource = await this.getParketParents(
flow,
Expand Down

0 comments on commit c7d3ad3

Please sign in to comment.