summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2018-05-23 15:28:14 +0000
committerMayra Cabrera <mcabrera@gitlab.com>2018-05-23 10:58:30 -0500
commitb2f54bc68f0469ad56b9f26b20e460f995300ea2 (patch)
tree6f0317a5debf9dee010145df3cb16e97f7eeac74 /app/controllers
parent85167d25799ade8230d2a56a560a8d1a1920aa2b (diff)
downloadgitlab-ce-b2f54bc68f0469ad56b9f26b20e460f995300ea2.tar.gz
Merge branch '46413-error-when-prometheus-adapter-is-disabled' into 'master'
Render 404 when prometheus adapter is disabled in Prometheus metrics controller Closes #46413 See merge request gitlab-org/gitlab-ce!19110
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/projects/prometheus/metrics_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/projects/prometheus/metrics_controller.rb b/app/controllers/projects/prometheus/metrics_controller.rb
index 1dd886409a5..c6b6243b553 100644
--- a/app/controllers/projects/prometheus/metrics_controller.rb
+++ b/app/controllers/projects/prometheus/metrics_controller.rb
@@ -25,7 +25,7 @@ module Projects
end
def require_prometheus_metrics!
- render_404 unless prometheus_adapter.can_query?
+ render_404 unless prometheus_adapter&.can_query?
end
end
end