diff options
author | Pawel Chojnacki <pawel@chojnacki.ws> | 2018-02-06 17:37:11 +0100 |
---|---|---|
committer | Pawel Chojnacki <pawel@chojnacki.ws> | 2018-02-06 17:37:11 +0100 |
commit | a1d10beebe73c96fb741cd9f728292ae32e80fc3 (patch) | |
tree | b6caa9f956bd3e31bf4f26a038f067d6dbf01679 /app | |
parent | ddc4ed633c47fb6708422d86bdb66ee5a930ca6a (diff) | |
download | gitlab-ce-a1d10beebe73c96fb741cd9f728292ae32e80fc3.tar.gz |
use find_or_initialize to fetch prometheus_service instance
Diffstat (limited to 'app')
-rw-r--r-- | app/models/clusters/applications/prometheus.rb | 2 |
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 |