diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2016-11-22 01:48:41 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2016-11-22 01:48:41 +0800 |
commit | 66301ce274b42cefe76e343a3d545c8f12d847b2 (patch) | |
tree | 1f4370e70bbcc0a734223b475d4c9e9946f67764 | |
parent | dd6b16a111a6e6cce0be322be8ddba17a2a30534 (diff) | |
download | gitlab-ce-66301ce274b42cefe76e343a3d545c8f12d847b2.tar.gz |
Filter against status first, otherwise we can't
find the latest successful one if the last one is
failed and we already exclude the others.
-rw-r--r-- | app/models/ci/pipeline.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb index 95af8c72309..61d9316a5d3 100644 --- a/app/models/ci/pipeline.rb +++ b/app/models/ci/pipeline.rb @@ -105,7 +105,7 @@ module Ci end def self.latest_successful_for(ref) - latest_for(ref).success.first + success.latest_for(ref).first end def self.truncate_sha(sha) |