diff options
Diffstat (limited to 'app/finders/projects_finder.rb')
-rw-r--r-- | app/finders/projects_finder.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/finders/projects_finder.rb b/app/finders/projects_finder.rb index ac18c17dc61..7cac8deea07 100644 --- a/app/finders/projects_finder.rb +++ b/app/finders/projects_finder.rb @@ -44,6 +44,8 @@ class ProjectsFinder < UnionFinder init_collection end + use_cte = params.delete(:use_cte) + collection = Project.wrap_authorized_projects_with_cte(collection) if use_cte collection = filter_projects(collection) sort(collection) end @@ -177,7 +179,7 @@ class ProjectsFinder < UnionFinder end def sort(items) - params[:sort].present? ? items.sort_by_attribute(params[:sort]) : items.order_id_desc + params[:sort].present? ? items.sort_by_attribute(params[:sort]) : items.projects_order_id_desc end def by_archived(projects) |