From 613b4c1c230b296be619e36b3560d9ac3356f339 Mon Sep 17 00:00:00 2001 From: Bowei Xu Date: Fri, 5 Apr 2019 14:48:49 -0700 Subject: [PATCH] Update list close workflows filter check (#1650) --- service/frontend/workflowHandler.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/service/frontend/workflowHandler.go b/service/frontend/workflowHandler.go index ae063f77ccb..282692e7a38 100644 --- a/service/frontend/workflowHandler.go +++ b/service/frontend/workflowHandler.go @@ -2526,9 +2526,6 @@ func (wh *WorkflowHandler) ListClosedWorkflowExecutions(ctx context.Context, } filterCount := 0 - if listRequest.ExecutionFilter != nil { - filterCount++ - } if listRequest.TypeFilter != nil { filterCount++ } @@ -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())))