summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorFloran Brutel <f.brutel@hexanet.fr>2014-03-04 09:33:07 +0100
committerFloran Brutel <f.brutel@hexanet.fr>2014-03-04 09:33:07 +0100
commit32aad146538a1597241a4d88e79db0b32cdaaa86 (patch)
tree385a81ed0cbc08a1b18866852f27e62c669ff603 /lib
parentf1f3353b575ba54aeeb940b812c7d547a11c3e66 (diff)
downloadgitlab-ci-32aad146538a1597241a4d88e79db0b32cdaaa86.tar.gz
Ignore build with started_at is null on "build duration" chart
Diffstat (limited to 'lib')
-rw-r--r--lib/charts.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/charts.rb b/lib/charts.rb
index ab80b6f..556a34d 100644
--- a/lib/charts.rb
+++ b/lib/charts.rb
@@ -55,7 +55,7 @@ module Charts
class BuildTime < Chart
def collect
- builds = project.builds.where('builds.finished_at is NOT NULL').last(30)
+ builds = project.builds.where('builds.finished_at is NOT NULL AND builds.started_at is NOT NULL').last(30)
builds.each do |build|
@labels << build.short_sha
@build_times << (build.duration / 60)