Skip to content

Commit

Permalink
Fixes #37938 - Reject start-at dates in the past when a job is scheduled
Browse files Browse the repository at this point in the history
Signed-off-by: Pablo Fernández Rodríguez <pafernan@redhat.com>
  • Loading branch information
pafernanr committed Oct 22, 2024
1 parent 749b439 commit c59952e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/models/foreman_tasks/triggering.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ def recurring?

def parse_start_at!
self.start_at ||= Time.zone.parse(start_at_raw) if start_at_raw.present?
errors.add(:start_at, _('is in the past')) if self.start_at < Time.zone.now
end

def parse_start_at
Expand Down

0 comments on commit c59952e

Please # to comment.