Skip to content

Commit dbd579a

Browse files
committed
fix: change order query conditions
Signed-off-by: Miguel Martinez <miguel@chainloop.dev>
1 parent b68fd78 commit dbd579a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/controlplane/pkg/data/workflowrun.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ func (r *WorkflowRunRepo) List(ctx context.Context, orgID uuid.UUID, filters *bi
320320
}
321321

322322
func (r *WorkflowRunRepo) ListNotFinishedOlderThan(ctx context.Context, olderThan time.Time, limit int) ([]*biz.WorkflowRun, error) {
323-
q := r.data.DB.WorkflowRun.Query().WithWorkflow().Where(workflowrun.CreatedAtLTE(olderThan)).Where(workflowrun.StateEQ(biz.WorkflowRunInitialized))
323+
q := r.data.DB.WorkflowRun.Query().WithWorkflow().Where(workflowrun.StateEQ(biz.WorkflowRunInitialized), workflowrun.CreatedAtLTE(olderThan))
324324
if limit > 0 {
325325
q = q.Limit(limit)
326326
}

0 commit comments

Comments
 (0)