From 9bb0d0b4079bc88134399f175ce9631005044060 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Sun, 22 May 2016 23:35:18 -0700 Subject: Fix Error 500 in CI charts by gracefully handling commits with no durations Closes #17730 --- lib/ci/charts.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/ci/charts.rb') diff --git a/lib/ci/charts.rb b/lib/ci/charts.rb index d53bdcbd0f2..e1636636934 100644 --- a/lib/ci/charts.rb +++ b/lib/ci/charts.rb @@ -64,7 +64,8 @@ module Ci commits.each do |commit| @labels << commit.short_sha - @build_times << (commit.duration / 60) + duration = commit.duration || 0 + @build_times << (duration / 60) end end end -- cgit v1.2.3