diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-09 21:09:34 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-09 21:09:34 +0300 |
commit | 141902c04943d5fb43c014b8cf42af60a3bc0cdf (patch) | |
tree | 7e5a31fe9b0434fa0071cb5d09273669c3a8acab /app/models/clusters/cluster.rb | |
parent | 209bd8cf1f542f6ba2a069b368a9187faa871e96 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/clusters/cluster.rb')
-rw-r--r-- | app/models/clusters/cluster.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/clusters/cluster.rb b/app/models/clusters/cluster.rb index 42771eaa82a..9ef3d64f21a 100644 --- a/app/models/clusters/cluster.rb +++ b/app/models/clusters/cluster.rb @@ -123,6 +123,7 @@ module Clusters scope :managed, -> { where(managed: true) } scope :with_persisted_applications, -> { eager_load(*APPLICATIONS_ASSOCIATIONS) } scope :default_environment, -> { where(environment_scope: DEFAULT_ENVIRONMENT) } + scope :with_management_project, -> { where.not(management_project: nil) } scope :for_project_namespace, -> (namespace_id) { joins(:projects).where(projects: { namespace_id: namespace_id }) } |