BigW Consortium Gitlab

Commit 888fba1e by Grzegorz Bizon

Order environments twice in environments serializer

parent 030adf12
...@@ -42,6 +42,7 @@ class EnvironmentSerializer < BaseSerializer ...@@ -42,6 +42,7 @@ class EnvironmentSerializer < BaseSerializer
'MAX(id) AS last_environment_id') 'MAX(id) AS last_environment_id')
environments = resource.where(id: items.map(&:last)) environments = resource.where(id: items.map(&:last))
.order('COALESCE(environment_type, name) ASC')
items.zip(environments).map do |item| items.zip(environments).map do |item|
Struct::Item.new(*item.flatten) Struct::Item.new(*item.flatten)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment