Commit ebe5e2be authored by Winnie Hellmann's avatar Winnie Hellmann Committed by Alessio Caiazza
Browse files

Ensure that execute_in of a build schedule is not negative

parent 42282004ce0a
......@@ -11,7 +11,7 @@ class BuildSchedule < ActiveRecord::Base
after_create :schedule, unless: :importing?
def execute_in
self.execute_at - Time.now
[0, self.execute_at - Time.now].max
end
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