diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-19 09:08:03 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-19 09:08:03 +0300 |
commit | 4e81d9c050bfea4c866329155c17b929d7381340 (patch) | |
tree | 70fd5d3445f0b285650e068a6e99e970ceee5e00 /app/models/iteration.rb | |
parent | fdfde5a37a82274d7babf2519fc802c03e728622 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/iteration.rb')
-rw-r--r-- | app/models/iteration.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/iteration.rb b/app/models/iteration.rb index bcb25012973..1acd08f2063 100644 --- a/app/models/iteration.rb +++ b/app/models/iteration.rb @@ -88,12 +88,12 @@ class Iteration < ApplicationRecord # ensure dates are in the future def future_date if start_date_changed? - errors.add(:start_date, s_("Iteration|cannot be in the past")) if start_date < Date.today + errors.add(:start_date, s_("Iteration|cannot be in the past")) if start_date < Date.current errors.add(:start_date, s_("Iteration|cannot be more than 500 years in the future")) if start_date > 500.years.from_now end if due_date_changed? - errors.add(:due_date, s_("Iteration|cannot be in the past")) if due_date < Date.today + errors.add(:due_date, s_("Iteration|cannot be in the past")) if due_date < Date.current errors.add(:due_date, s_("Iteration|cannot be more than 500 years in the future")) if due_date > 500.years.from_now end end |