summaryrefslogtreecommitdiff
path: root/app/finders/pipelines_finder.rb
diff options
context:
space:
mode:
authorShinya Maeda <gitlab.shinyamaeda@gmail.com>2017-03-01 02:34:48 +0900
committerShinya Maeda <gitlab.shinyamaeda@gmail.com>2017-05-03 02:11:50 +0900
commitdf834306c1794ed72d6d655c7941dee28f7e85c7 (patch)
tree8bc6c2c173c7cbc803ad4036f7a43d4442cef109 /app/finders/pipelines_finder.rb
parent994e49b3fbc261f8e59429c1681d83c81ba25df3 (diff)
downloadgitlab-ce-df834306c1794ed72d6d655c7941dee28f7e85c7.tar.gz
Add specs. Plus, minor fixes.
Diffstat (limited to 'app/finders/pipelines_finder.rb')
-rw-r--r--app/finders/pipelines_finder.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/finders/pipelines_finder.rb b/app/finders/pipelines_finder.rb
index c2e247a7ded..ff16d7305ad 100644
--- a/app/finders/pipelines_finder.rb
+++ b/app/finders/pipelines_finder.rb
@@ -88,8 +88,12 @@ class PipelinesFinder
end
def by_yaml_errors(items)
- if params[:yaml_errors].present? && params[:yaml_errors]
- items.where("yaml_errors IS NOT NULL")
+ if params[:yaml_errors].present?
+ if params[:yaml_errors]
+ items.where("yaml_errors IS NOT NULL")
+ else
+ items.where("yaml_errors IS NULL")
+ end
else
items
end