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:
Diffstat (limited to 'app/models/deployment.rb')
-rw-r--r--app/models/deployment.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/deployment.rb b/app/models/deployment.rb
index f3ee21ea4e0..1e3a80087c8 100644
--- a/app/models/deployment.rb
+++ b/app/models/deployment.rb
@@ -16,7 +16,6 @@ class Deployment < ApplicationRecord
belongs_to :project, optional: false
belongs_to :environment, optional: false
- belongs_to :cluster, class_name: 'Clusters::Cluster', optional: true
belongs_to :user
belongs_to :deployable, polymorphic: true, optional: true, inverse_of: :deployment # rubocop:disable Cop/PolymorphicAssociations
has_many :deployment_merge_requests
@@ -35,6 +34,7 @@ class Deployment < ApplicationRecord
delegate :name, to: :environment, prefix: true
delegate :kubernetes_namespace, to: :deployment_cluster, allow_nil: true
+ delegate :cluster, to: :deployment_cluster, allow_nil: true
scope :for_iid, -> (project, iid) { where(project: project, iid: iid) }
scope :for_environment, -> (environment) { where(environment_id: environment) }