diff options
Diffstat (limited to 'app/models/namespaces/traversal/linear_scopes.rb')
-rw-r--r-- | app/models/namespaces/traversal/linear_scopes.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/namespaces/traversal/linear_scopes.rb b/app/models/namespaces/traversal/linear_scopes.rb index f4dc69395c8..67c67fc53ed 100644 --- a/app/models/namespaces/traversal/linear_scopes.rb +++ b/app/models/namespaces/traversal/linear_scopes.rb @@ -63,7 +63,11 @@ module Namespaces # Make sure we drop the STI `type = 'Group'` condition for better performance. # Logically equivalent so long as hierarchies remain homogeneous. def without_sti_condition - unscope(where: :type) + if Feature.enabled?(:include_sti_condition, default_enabled: :yaml) + all + else + unscope(where: :type) + end end def order_by_depth(hierarchy_order) |