#345: Fixed: undefined method utc for nil:NilClass

This commit is contained in:
Vokhmin Alexey V 2014-03-26 00:36:54 +04:00
parent 3eda2718f8
commit ea4d28d6d1
1 changed files with 5 additions and 1 deletions

View File

@ -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