summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPawel Chojnacki <pawel@chojnacki.ws>2018-02-06 17:37:11 +0100
committerPawel Chojnacki <pawel@chojnacki.ws>2018-02-06 17:37:11 +0100
commita1d10beebe73c96fb741cd9f728292ae32e80fc3 (patch)
treeb6caa9f956bd3e31bf4f26a038f067d6dbf01679
parentddc4ed633c47fb6708422d86bdb66ee5a930ca6a (diff)
downloadgitlab-ce-a1d10beebe73c96fb741cd9f728292ae32e80fc3.tar.gz
use find_or_initialize to fetch prometheus_service instance
-rw-r--r--app/models/clusters/applications/prometheus.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/clusters/applications/prometheus.rb b/app/models/clusters/applications/prometheus.rb
index 630f92adfcc..aa22e9d5d58 100644
--- a/app/models/clusters/applications/prometheus.rb
+++ b/app/models/clusters/applications/prometheus.rb
@@ -13,7 +13,7 @@ module Clusters
state_machine :status do
after_transition any => [:installed] do |application|
application.cluster.projects.each do |project|
- project.prometheus_service&.update(active: true)
+ project.find_or_initialize_service('prometheus').update(active: true)
end
end
end