From d74abe41c00eedb95738a74b9bbdea67e423103b Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Thu, 27 Jul 2023 21:07:46 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- app/finders/deployments_finder.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'app/finders') diff --git a/app/finders/deployments_finder.rb b/app/finders/deployments_finder.rb index 800158dfd0a..9881cb3fc74 100644 --- a/app/finders/deployments_finder.rb +++ b/app/finders/deployments_finder.rb @@ -25,7 +25,7 @@ class DeploymentsFinder # performant with the other filtering/sorting parameters. # The composed query could be significantly slower when the filtering and sorting columns are different. # See https://gitlab.com/gitlab-org/gitlab/-/issues/325627 for example. - ALLOWED_SORT_VALUES = %w[id iid created_at updated_at ref finished_at].freeze + ALLOWED_SORT_VALUES = %w[id iid created_at updated_at finished_at].freeze DEFAULT_SORT_VALUE = 'id' ALLOWED_SORT_DIRECTIONS = %w[asc desc].freeze @@ -128,7 +128,6 @@ class DeploymentsFinder def build_sort_params order_by = ALLOWED_SORT_VALUES.include?(params[:order_by]) ? params[:order_by] : DEFAULT_SORT_VALUE - order_by = DEFAULT_SORT_VALUE if order_by == 'ref' && Feature.enabled?(:remove_deployments_api_ref_sort) order_direction = ALLOWED_SORT_DIRECTIONS.include?(params[:sort]) ? params[:sort] : DEFAULT_SORT_DIRECTION { order_by => order_direction } -- cgit v1.2.3