summaryrefslogtreecommitdiff
path: root/app/controllers/projects/environments_controller.rb
diff options
context:
space:
mode:
authorsyasonik <syasonik@gitlab.com>2019-04-22 14:23:35 +0800
committersyasonik <syasonik@gitlab.com>2019-04-24 18:23:04 +0800
commita08d4cad90f98169339a3793d18f1bae4e46ad83 (patch)
tree91238d10798fe5e896f05fe8c8d83e388706e6e0 /app/controllers/projects/environments_controller.rb
parent25f957711dac1d401982c18da439580b2e9912c9 (diff)
downloadgitlab-ce-a08d4cad90f98169339a3793d18f1bae4e46ad83.tar.gz
Defend against dashboard errors, rework sequence
Diffstat (limited to 'app/controllers/projects/environments_controller.rb')
-rw-r--r--app/controllers/projects/environments_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/projects/environments_controller.rb b/app/controllers/projects/environments_controller.rb
index 29aab7baa60..04f9782b158 100644
--- a/app/controllers/projects/environments_controller.rb
+++ b/app/controllers/projects/environments_controller.rb
@@ -158,7 +158,7 @@ class Projects::EnvironmentsController < Projects::ApplicationController
end
def metrics_dashboard
- render_403 && return unless Feature.enabled?(:environment_metrics_use_prometheus_endpoint, @project)
+ return render_403 unless Feature.enabled?(:environment_metrics_use_prometheus_endpoint, @project)
result = Gitlab::MetricsDashboard::Service.new(@project, @current_user, environment: environment).get_dashboard
respond_to do |format|