diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-20 21:08:51 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-20 21:08:51 +0300 |
commit | df2eda3f14dccb703bd7054d4ddde7803cb1fe7e (patch) | |
tree | 0200bb0def01cde22da3bc4c9ed0a7b0f91d6b50 /app/models/ci/build.rb | |
parent | b9bac6dbf78a5a7976fba14aaeef96bdeb0da612 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/ci/build.rb')
-rw-r--r-- | app/models/ci/build.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb index e95e2c538c5..d61f0bbfb10 100644 --- a/app/models/ci/build.rb +++ b/app/models/ci/build.rb @@ -173,8 +173,10 @@ module Ci scope :queued_before, ->(time) { where(arel_table[:queued_at].lt(time)) } scope :order_id_desc, -> { order('ci_builds.id DESC') } - PROJECT_ROUTE_AND_NAMESPACE_ROUTE = { project: [:project_feature, :route, { namespace: :route }] }.freeze - scope :preload_project_and_pipeline_project, -> { preload(PROJECT_ROUTE_AND_NAMESPACE_ROUTE, pipeline: PROJECT_ROUTE_AND_NAMESPACE_ROUTE) } + scope :preload_project_and_pipeline_project, -> do + preload(Ci::Pipeline::PROJECT_ROUTE_AND_NAMESPACE_ROUTE, + pipeline: Ci::Pipeline::PROJECT_ROUTE_AND_NAMESPACE_ROUTE) + end acts_as_taggable |