#345: Fixed: undefined method utc for nil:NilClass
This commit is contained in:
parent
3eda2718f8
commit
ea4d28d6d1
|
@ -432,7 +432,11 @@ class BuildList < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def current_duration
|
||||
(Time.now.utc - started_at.utc).to_i
|
||||
if started_at
|
||||
(Time.now.utc - started_at.utc).to_i
|
||||
else
|
||||
0
|
||||
end
|
||||
end
|
||||
|
||||
def human_current_duration
|
||||
|
|
Loading…
Reference in New Issue