Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-03-29 15:09:14 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-03-29 15:09:14 +0300
commit1838e244070041ed8ebb6344c628b580d78b578f (patch)
treea6c863a58c74747c2241ff6df35593dfecfa83aa /app/models
parent290b2ab01becf60d9eaf1094b620f1fb32fdccb3 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models')
-rw-r--r--app/models/deployment.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/deployment.rb b/app/models/deployment.rb
index 5b3671923cc..423914139ba 100644
--- a/app/models/deployment.rb
+++ b/app/models/deployment.rb
@@ -45,6 +45,7 @@ class Deployment < ApplicationRecord
scope :active, -> { where(status: %i[created running]) }
scope :older_than, -> (deployment) { where('deployments.id < ?', deployment.id) }
scope :with_deployable, -> { joins('INNER JOIN ci_builds ON ci_builds.id = deployments.deployable_id').preload(:deployable) }
+ scope :with_api_entity_associations, -> { preload({ deployable: { runner: [], tags: [], user: [], job_artifacts_archive: [] } }) }
scope :finished_after, ->(date) { where('finished_at >= ?', date) }
scope :finished_before, ->(date) { where('finished_at < ?', date) }