Skip to content

Commit

Permalink
Bypass nil values when calculating TTD chart
Browse files Browse the repository at this point in the history
Closes: #934
  • Loading branch information
tripleee committed Nov 20, 2024
1 parent 5f9a1aa commit a1c59a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/graphs_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit a1c59a5

Please sign in to comment.