summaryrefslogtreecommitdiff
path: root/app/models/ci/ref.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/ci/ref.rb')
-rw-r--r--app/models/ci/ref.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/ci/ref.rb b/app/models/ci/ref.rb
index be6062b6e6e..29b44575d65 100644
--- a/app/models/ci/ref.rb
+++ b/app/models/ci/ref.rb
@@ -43,7 +43,7 @@ module Ci
end
def last_finished_pipeline_id
- Ci::Pipeline.where(ci_ref_id: self.id).finished.order(id: :desc).select(:id).take&.id
+ Ci::Pipeline.last_finished_for_ref_id(self.id)&.id
end
def update_status_by!(pipeline)