diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
commit | 6ed4ec3e0b1340f96b7c043ef51d1b33bbe85fde (patch) | |
tree | dc4d20fe6064752c0bd323187252c77e0a89144b /app/finders/environments/environments_finder.rb | |
parent | 9868dae7fc0655bd7ce4a6887d4e6d487690eeed (diff) |
Add latest changes from gitlab-org/gitlab@15-4-stable-eev15.4.0-rc42
Diffstat (limited to 'app/finders/environments/environments_finder.rb')
-rw-r--r-- | app/finders/environments/environments_finder.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/finders/environments/environments_finder.rb b/app/finders/environments/environments_finder.rb index 46c49f096c6..f2dcba04349 100644 --- a/app/finders/environments/environments_finder.rb +++ b/app/finders/environments/environments_finder.rb @@ -14,6 +14,7 @@ module Environments def execute environments = project.environments + environments = by_type(environments) environments = by_name(environments) environments = by_search(environments) environments = by_ids(environments) @@ -24,6 +25,12 @@ module Environments private + def by_type(environments) + return environments unless params[:type].present? + + environments.for_type(params[:type]) + end + def by_name(environments) if params[:name].present? environments.for_name(params[:name]) |