Skip to content

Commit

Permalink
feat: cap National Report Coverage to 2 decimal
Browse files Browse the repository at this point in the history
  • Loading branch information
yuelongh committed Aug 22, 2024
1 parent 1df473a commit 20f32bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/presenters/statistic_presenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def method_missing method

nr_stat = "percentage_nr_#{land_type}_cover".to_sym
define_method(nr_stat) do
(@statistic.send(nr_stat) && @statistic.send(nr_stat) > 100.0) ? 100.0 : @statistic.send(nr_stat).round(0) rescue nil
(@statistic.send(nr_stat) && @statistic.send(nr_stat) > 100.0) ? 100.0 : @statistic.send(nr_stat).round(2) rescue nil
end

percent_oecm_stat = "percentage_oecms_pa_#{land_type}_cover".to_sym
Expand Down

0 comments on commit 20f32bd

Please sign in to comment.