summaryrefslogtreecommitdiff
path: root/app/models/commit.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-11-06 12:32:21 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-11-06 12:32:21 +0200
commit522d70c0c75de4ffa165487899530e4ba3158cee (patch)
treecc08596c95e00194c446ab345cef573fd7ed2eef /app/models/commit.rb
parentad8892a97aa74ca7dcc6aae790de9f2ca6df1943 (diff)
downloadgitlab-ci-522d70c0c75de4ffa165487899530e4ba3158cee.tar.gz
Select where duration not nil
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/models/commit.rb')
-rw-r--r--app/models/commit.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb
index 6568e34..33087b3 100644
--- a/app/models/commit.rb
+++ b/app/models/commit.rb
@@ -144,7 +144,7 @@ class Commit < ActiveRecord::Base
end
def duration
- @duration ||= builds.select(&:finished_at).sum(&:duration).to_i
+ @duration ||= builds.select(&:duration).sum(&:duration).to_i
end
def finished_at