summaryrefslogtreecommitdiff
path: root/app/models/clusters
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-09 18:09:34 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-09 18:09:34 +0000
commit141902c04943d5fb43c014b8cf42af60a3bc0cdf (patch)
tree7e5a31fe9b0434fa0071cb5d09273669c3a8acab /app/models/clusters
parent209bd8cf1f542f6ba2a069b368a9187faa871e96 (diff)
downloadgitlab-ce-141902c04943d5fb43c014b8cf42af60a3bc0cdf.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/clusters')
-rw-r--r--app/models/clusters/cluster.rb1
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 }) }