summaryrefslogtreecommitdiff
path: root/app/services
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-05-26 13:48:43 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-05-26 13:48:43 +0000
commit00ed89bc218dc88eae9a4e8de1ce5813729ebfdc (patch)
tree789519e95d46b536ea01292ae58945f2ded55277 /app/services
parent37caeffc694e7b6b937eb8c0043ca1f14625c196 (diff)
downloadgitlab-ce-00ed89bc218dc88eae9a4e8de1ce5813729ebfdc.tar.gz
Add latest changes from gitlab-org/security/gitlab@13-0-stable-ee
Diffstat (limited to 'app/services')
-rw-r--r--app/services/clusters/update_service.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/services/clusters/update_service.rb b/app/services/clusters/update_service.rb
index 2315df612a1..ba20826848d 100644
--- a/app/services/clusters/update_service.rb
+++ b/app/services/clusters/update_service.rb
@@ -10,6 +10,12 @@ module Clusters
def execute(cluster)
if validate_params(cluster)
+ token = params.dig(:platform_kubernetes_attributes, :token)
+
+ if token.blank?
+ params[:platform_kubernetes_attributes]&.delete(:token)
+ end
+
cluster.update(params)
else
false