Commit 0249d2a5 authored by Bob Van Landuyt's avatar Bob Van Landuyt

Merge branch '323730-remove-hardcoded-order-scope-for-ci-build' into 'master'

Use arel order for "order_id_desc" scope

See merge request gitlab-org/gitlab!84215
parents cacf9078 a44f70da
......@@ -33,7 +33,7 @@ class CommitStatus < Ci::ApplicationRecord
where(allow_failure: true, status: [:failed, :canceled])
end
scope :order_id_desc, -> { order('ci_builds.id DESC') }
scope :order_id_desc, -> { order(id: :desc) }
scope :exclude_ignored, -> do
# We want to ignore failed but allowed to fail jobs.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment