diff --git a/app/controllers/graphs_controller.rb b/app/controllers/graphs_controller.rb index 528c8d29..7ffcbebb 100644 --- a/app/controllers/graphs_controller.rb +++ b/app/controllers/graphs_controller.rb @@ -158,7 +158,7 @@ def monthly_ttd .to_h end end - data = data.map { |k, v| [k, v.round(params[:round].to_i)] } if params[:round] + data = data.map { |k, v| [k, v&.round(params[:round].to_i)] } if params[:round] render json: data end