diff options
author | Dylan Griffith <dyl.griffith@gmail.com> | 2019-04-26 13:28:49 +1000 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-04-29 22:55:12 -0700 |
commit | 0a4817dd77eb371f171b634e4df180eafa115721 (patch) | |
tree | 9f7caaedef2c3e297e04cf6f2c333950f3d2f0c0 /app/models/clusters | |
parent | 50fa7847bb89254ab0dbe163b5e71bb43b6d6b14 (diff) | |
download | gitlab-ce-0a4817dd77eb371f171b634e4df180eafa115721.tar.gz |
In Prometheus use update! instead of update
In order to not miss any errors since we are not checking the return
value of update
Diffstat (limited to 'app/models/clusters')
-rw-r--r-- | app/models/clusters/applications/prometheus.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/clusters/applications/prometheus.rb b/app/models/clusters/applications/prometheus.rb index 1a715830953..a6b7617b830 100644 --- a/app/models/clusters/applications/prometheus.rb +++ b/app/models/clusters/applications/prometheus.rb @@ -21,7 +21,7 @@ module Clusters state_machine :status do after_transition any => [:installed] do |application| application.cluster.projects.each do |project| - project.find_or_initialize_service('prometheus').update(active: true) + project.find_or_initialize_service('prometheus').update!(active: true) end end end @@ -94,7 +94,7 @@ module Clusters def disable_prometheus_integration cluster.projects.each do |project| - project.prometheus_service&.update(active: false) + project.prometheus_service&.update!(active: false) end end |