diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-09 15:11:57 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-09 15:11:57 +0300 |
commit | 1f229cdc22b5b32989bcff2037d8925c75703671 (patch) | |
tree | c92e9dff7737e78d7331518cdf69f90403af09ea /app/finders | |
parent | 7a98d989740ec85982cdb6c1d57c8f24270e455e (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/finders')
-rw-r--r-- | app/finders/ci/daily_build_group_report_results_finder.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/app/finders/ci/daily_build_group_report_results_finder.rb b/app/finders/ci/daily_build_group_report_results_finder.rb index 33aefe29392..b93b7dbe0c5 100644 --- a/app/finders/ci/daily_build_group_report_results_finder.rb +++ b/app/finders/ci/daily_build_group_report_results_finder.rb @@ -82,14 +82,20 @@ module Ci end def start_date - start_date = Date.strptime(params[:start_date], DATE_FORMAT_ALLOWED) rescue REPORT_WINDOW.ago.to_date + start_date = begin + Date.strptime(params[:start_date], DATE_FORMAT_ALLOWED) + rescue StandardError + REPORT_WINDOW.ago.to_date + end # The start_date cannot be older than `end_date - 90 days` [start_date, end_date - REPORT_WINDOW].max end def end_date - Date.strptime(params[:end_date], DATE_FORMAT_ALLOWED) rescue Date.current + Date.strptime(params[:end_date], DATE_FORMAT_ALLOWED) + rescue StandardError + Date.current end end end |