diff options
Diffstat (limited to 'app/controllers/projects/deployments_controller.rb')
-rw-r--r-- | app/controllers/projects/deployments_controller.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/controllers/projects/deployments_controller.rb b/app/controllers/projects/deployments_controller.rb index 29d94e2760a..acf5573935a 100644 --- a/app/controllers/projects/deployments_controller.rb +++ b/app/controllers/projects/deployments_controller.rb @@ -24,10 +24,11 @@ class Projects::DeploymentsController < Projects::ApplicationController def additional_metrics return render_404 unless deployment.has_additional_metrics? + metrics = deployment.additional_metrics - if metrics&.any? - render json: metrics, status: :ok + if metrics.any? + render json: metrics else head :no_content end |