diff --git a/app/controllers/report_controller.rb b/app/controllers/report_controller.rb --- a/app/controllers/report_controller.rb +++ b/app/controllers/report_controller.rb @@ -52,6 +52,8 @@ #set up range from param @since_id = params.fetch(:from_id, 0).to_i @until_id = params.fetch(:to_id, 0).to_i + @since_id = nil if @since_id == 0 + @until_id = nil if @until_id == 0 #calculate the routine @scorearray = calculate_max_score(@problems, @users, @since_id, @until_id)