diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-11-06 12:32:21 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-11-06 12:32:21 +0200 |
commit | 522d70c0c75de4ffa165487899530e4ba3158cee (patch) | |
tree | cc08596c95e00194c446ab345cef573fd7ed2eef /app/models/commit.rb | |
parent | ad8892a97aa74ca7dcc6aae790de9f2ca6df1943 (diff) | |
download | gitlab-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.rb | 2 |
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 |