diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2016-10-05 00:10:23 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2016-10-05 00:10:23 +0800 |
commit | 5c9ac560e7e916c8a082c99309fbd4031b1a6803 (patch) | |
tree | 55e766ff1bbffd0be537f558d3c71b1a38b307d1 /app/models/commit_status.rb | |
parent | aafb0171e6fb17789754ee71bc5c3c6bca94bf7b (diff) | |
download | gitlab-ce-5c9ac560e7e916c8a082c99309fbd4031b1a6803.tar.gz |
Introduce all_state_names so that we could avoid NOT IN
Diffstat (limited to 'app/models/commit_status.rb')
-rw-r--r-- | app/models/commit_status.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/commit_status.rb b/app/models/commit_status.rb index 99622014662..ee3396abe04 100644 --- a/app/models/commit_status.rb +++ b/app/models/commit_status.rb @@ -32,8 +32,8 @@ class CommitStatus < ActiveRecord::Base scope :exclude_ignored, -> do quoted_when = connection.quote_column_name('when') # We want to ignore failed_but_allowed jobs - where("allow_failure = ? OR status NOT IN (?)", - false, [:failed, :canceled]). + where("allow_failure = ? OR status IN (?)", + false, all_state_names - [:failed, :canceled]). # We want to ignore skipped manual jobs where("#{quoted_when} <> ? OR status <> ?", 'manual', 'skipped'). # We want to ignore skipped on_failure |