Commit 384c5e16 authored by Douwe Maan's avatar Douwe Maan

Restructure `foo ? bar : false` as `foo && bar`

parent 7fd5dbf9
......@@ -288,21 +288,16 @@ class IssuableFinder
def use_subquery_for_search?
strong_memoize(:use_subquery_for_search) do
if attempt_group_search_optimizations?
attempt_group_search_optimizations? &&
Feature.enabled?(:use_subquery_for_group_issues_search, default_enabled: false)
else
false
end
end
end
def use_cte_for_search?
strong_memoize(:use_cte_for_search) do
if attempt_group_search_optimizations? && !use_subquery_for_search?
attempt_group_search_optimizations? &&
!use_subquery_for_search? &&
Feature.enabled?(:use_cte_for_group_issues_search, default_enabled: true)
else
false
end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment