From 44e41dcf10561fabdffcca7b497b6dab353c8d72 Mon Sep 17 00:00:00 2001 From: Thorsten Eckel Date: Fri, 9 Jun 2017 10:06:04 +0200 Subject: [PATCH] Fixed issue #1176 - Generation of weekly report fails with internal server error. --- app/controllers/reports_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/reports_controller.rb b/app/controllers/reports_controller.rb index ccfd83d26..7abb9ccf8 100644 --- a/app/controllers/reports_controller.rb +++ b/app/controllers/reports_controller.rb @@ -143,7 +143,7 @@ class ReportsController < ApplicationController stop = "#{date}T23:59:59Z" range = 'hour' elsif params[:timeRange] == 'week' - start = Date.commercial(params[:year], params[:week]).iso8601 + start = Date.commercial(params[:year].to_i, params[:week].to_i).iso8601 stop = Date.parse(start).end_of_week.iso8601 range = 'week' elsif params[:timeRange] == 'month'