diff options
author | Stan Hu <stanhu@gmail.com> | 2016-05-23 09:35:18 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2016-05-23 09:52:50 +0300 |
commit | 9bb0d0b4079bc88134399f175ce9631005044060 (patch) | |
tree | 9c1af50c90db6756ecbd9b4a2ee7d57edf5f49e5 /lib/ci/charts.rb | |
parent | 53ad33e4ba1b079e4f2aebceb42a7301c5ce2e4a (diff) |
Fix Error 500 in CI charts by gracefully handling commits with no durations
Closes #17730
Diffstat (limited to 'lib/ci/charts.rb')
-rw-r--r-- | lib/ci/charts.rb | 3 |
1 files changed, 2 insertions, 1 deletions
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 |