Skip to content

Commit

Permalink
Merge pull request #4395 from alphagov/keep-nil-statistics-values
Browse files Browse the repository at this point in the history
Stop converting nil graph values to zero
  • Loading branch information
leenagupte authored Nov 14, 2024
2 parents 5172917 + 305b5c1 commit 5127521
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/models/landing_page/block/statistics.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def x_axis_keys
def rows
csv_headers[1..].map do |header|
values = csv_rows.map do |row|
row[header].to_f
row[header].to_f if row[header].present?
end

{
Expand Down
4 changes: 2 additions & 2 deletions spec/models/landing_page/block/statistics_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@
0.6,
0.7,
0.5,
0.0,
0.0,
nil,
nil,
0.5,
0.6,
],
Expand Down

0 comments on commit 5127521

Please sign in to comment.