Commit 7fffe0fb authored by Winnie Hellmann's avatar Winnie Hellmann Committed by Alessio Caiazza

Ensure that execute_in of a build schedule is not negative

parent f9877d71
...@@ -11,7 +11,7 @@ module Ci ...@@ -11,7 +11,7 @@ module Ci
after_create :schedule, unless: :importing? after_create :schedule, unless: :importing?
def execute_in def execute_in
self.execute_at - Time.now [0, self.execute_at - Time.now].max
end end
private private
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment