We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0fd9aa7 commit 2ecdf81Copy full SHA for 2ecdf81
coderd/database/dbmem/dbmem.go
@@ -4110,7 +4110,9 @@ func (q *FakeQuerier) GetProvisionerJobsByOrganizationAndStatusWithQueuePosition
4110
slices.SortFunc(rows, func(a, b database.GetProvisionerJobsByOrganizationAndStatusWithQueuePositionAndProvisionerRow) int {
4111
return b.ProvisionerJob.CreatedAt.Compare(a.ProvisionerJob.CreatedAt)
4112
})
4113
-
+ if arg.Limit.Valid && arg.Limit.Int32 > 0 && len(rows) > int(arg.Limit.Int32) {
4114
+ rows = rows[:arg.Limit.Int32]
4115
+ }
4116
return rows, nil
4117
}
4118
0 commit comments