From ea4d28d6d1683d644c6b782c739a4a3213b6fe5e Mon Sep 17 00:00:00 2001 From: Vokhmin Alexey V Date: Wed, 26 Mar 2014 00:36:54 +0400 Subject: [PATCH] #345: Fixed: undefined method utc for nil:NilClass --- app/models/build_list.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/models/build_list.rb b/app/models/build_list.rb index 041ed63b3..83e10413a 100644 --- a/app/models/build_list.rb +++ b/app/models/build_list.rb @@ -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