Skip to content

Commit

Permalink
Merge pull request #1025 from tripleee/bypass-nil-ttd-chart-934
Browse files Browse the repository at this point in the history
Bypass nil values when calculating TTD chart
  • Loading branch information
tripleee authored Nov 21, 2024
2 parents 5f9a1aa + a1c59a5 commit b57f107
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 b57f107

Please sign in to comment.