Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2018-12-06 19:31:30 +0300
committerDouwe Maan <douwe@gitlab.com>2018-12-06 19:31:30 +0300
commit384c5e162d59e6d276d9bad0bd25163ee6d63c5c (patch)
tree54b870f679b1f100db557af37775ec8b88464e74 /app/finders/issuable_finder.rb
parent7fd5dbf9db4e513faaabbe14aff3c10fca603415 (diff)
Restructure `foo ? bar : false` as `foo && bar`
Diffstat (limited to 'app/finders/issuable_finder.rb')
-rw-r--r--app/finders/issuable_finder.rb11
1 files changed, 3 insertions, 8 deletions
diff --git a/app/finders/issuable_finder.rb b/app/finders/issuable_finder.rb
index 247f2d373f1..7bf1875912d 100644
--- a/app/finders/issuable_finder.rb
+++ b/app/finders/issuable_finder.rb
@@ -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