summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/finders/pipelines_finder.rb12
1 files changed, 5 insertions, 7 deletions
diff --git a/app/finders/pipelines_finder.rb b/app/finders/pipelines_finder.rb
index 93f1ab9598f..46588cf3c16 100644
--- a/app/finders/pipelines_finder.rb
+++ b/app/finders/pipelines_finder.rb
@@ -88,13 +88,11 @@ class PipelinesFinder
end
def by_yaml_errors(items)
- flg = Gitlab::Utils.to_boolean(params[:yaml_errors])
- if !flg.nil?
- if flg
- items.where("yaml_errors IS NOT NULL")
- else
- items.where("yaml_errors IS NULL")
- end
+ case Gitlab::Utils.to_boolean(params[:yaml_errors])
+ when true
+ items.where("yaml_errors IS NOT NULL")
+ when false
+ items.where("yaml_errors IS NULL")
else
items
end