diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-02 15:09:26 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-02 15:09:26 +0300 |
commit | c658e2d29296721aa65d569a42b778485042795a (patch) | |
tree | 24a39099120ead3fc31d7f115094dc928c38af29 /app/serializers | |
parent | 3256c55b0f188227e27a4863532feee84e654911 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/serializers')
-rw-r--r-- | app/serializers/environment_serializer.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/serializers/environment_serializer.rb b/app/serializers/environment_serializer.rb index c73b1ad6073..6363d6276a7 100644 --- a/app/serializers/environment_serializer.rb +++ b/app/serializers/environment_serializer.rb @@ -34,8 +34,8 @@ class EnvironmentSerializer < BaseSerializer # rubocop: disable CodeReuse/ActiveRecord def itemize(resource) items = resource.order('folder ASC') - .group('COALESCE(environment_type, name)') - .select('COALESCE(environment_type, name) AS folder', + .group('COALESCE(environment_type, id::text)', 'COALESCE(environment_type, name)') + .select('COALESCE(environment_type, id::text), COALESCE(environment_type, name) AS folder', 'COUNT(*) AS size', 'MAX(id) AS last_id') # It makes a difference when you call `paginate` method, because |