diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-11-02 15:11:46 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-11-02 15:11:46 +0300 |
commit | d8c4c08d4999959ca9b5a87a32153013791e96e0 (patch) | |
tree | 5772e13f80e3e85334f8b059c103a4065de8d682 /lib/gitlab | |
parent | aa84824d04b32ce9cd3abeac90a6bf78fb2be34c (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab')
-rw-r--r-- | lib/gitlab/analytics/cycle_analytics/request_params.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/gitlab/analytics/cycle_analytics/request_params.rb b/lib/gitlab/analytics/cycle_analytics/request_params.rb index cea25ba2db4..0c4a0afa1d5 100644 --- a/lib/gitlab/analytics/cycle_analytics/request_params.rb +++ b/lib/gitlab/analytics/cycle_analytics/request_params.rb @@ -203,7 +203,8 @@ module Gitlab def validate_date_range return if created_after.nil? || created_before.nil? - if (created_before - created_after) > MAX_RANGE_DAYS + time_period = created_before.at_beginning_of_day - created_after.at_beginning_of_day + if time_period > MAX_RANGE_DAYS errors.add(:created_after, s_('CycleAnalytics|The given date range is larger than 180 days')) end end |