fix: unit tests

This commit is contained in:
Andrey Melnikov
2020-09-30 12:54:35 -07:00
parent 1ed3b3e740
commit 49b9bc4f93
5 changed files with 27 additions and 10 deletions

View File

@@ -75,7 +75,7 @@ func (wf *WorkflowExecutionFilter) GetLabels() []*Label {
}
func applyWorkflowExecutionFilter(sb sq.SelectBuilder, request *request.Request) (sq.SelectBuilder, error) {
if request.Filter == nil {
if !request.HasFilter() {
return sb, nil
}
@@ -865,8 +865,7 @@ func (c *Client) ListWorkflowExecutions(namespace, workflowTemplateUID, workflow
return nil, err
}
sb = *request.Pagination.ApplyToSelect(&sb)
sb = *request.ApplyPaginationToSelect(&sb)
if err := c.DB.Selectx(&workflows, sb); err != nil {
return nil, err
}