Skip to content

Commit

Permalink
Update list close workflows filter check (cadence-workflow#1650)
Browse files Browse the repository at this point in the history
  • Loading branch information
vancexu authored Apr 5, 2019
1 parent de3fb1c commit 613b4c1
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions service/frontend/workflowHandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -2526,9 +2526,6 @@ func (wh *WorkflowHandler) ListClosedWorkflowExecutions(ctx context.Context,
}

filterCount := 0
if listRequest.ExecutionFilter != nil {
filterCount++
}
if listRequest.TypeFilter != nil {
filterCount++
}
Expand All @@ -2539,7 +2536,7 @@ func (wh *WorkflowHandler) ListClosedWorkflowExecutions(ctx context.Context,
if filterCount > 1 {
return nil, wh.error(&gen.BadRequestError{
Message: "Only one of ExecutionFilter, TypeFilter or StatusFilter is allowed"}, scope)
}
} // If ExecutionFilter is provided with one of TypeFilter or StatusFilter, use ExecutionFilter and ignore other filter

if listRequest.GetMaximumPageSize() <= 0 {
listRequest.MaximumPageSize = common.Int32Ptr(int32(wh.config.VisibilityMaxPageSize(listRequest.GetDomain())))
Expand Down

0 comments on commit 613b4c1

Please sign in to comment.