Skip to content

Commit 1f723c1

Browse files
committed
Merge pull request travis-ci#547 from travis-ci/cd-after-number
Improve query for listing builds `after-number` (i.e. builds `older_than`)
2 parents af5b04f + 17cf843 commit 1f723c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/travis/model/build.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def last_state_on(options)
130130
end
131131

132132
def older_than(build = nil)
133-
scope = descending.paged({}) # TODO in which case we'd call older_than without an argument?
133+
scope = order('number::integer DESC').paged({}) # TODO in which case we'd call older_than without an argument?
134134
scope = scope.where('number::integer < ?', (build.is_a?(Build) ? build.number : build).to_i) if build
135135
scope
136136
end

0 commit comments

Comments
 (0)