From 9532c0a1979216733be3854b90d7e72ed232f1ae Mon Sep 17 00:00:00 2001 From: Ramon Maciel Date: Wed, 12 Jan 2022 16:13:03 +0100 Subject: [PATCH] Fix field sorting --- lib/forest_liana/schema_file_updater.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/forest_liana/schema_file_updater.rb b/lib/forest_liana/schema_file_updater.rb index 9ffd606e..b37b537a 100644 --- a/lib/forest_liana/schema_file_updater.rb +++ b/lib/forest_liana/schema_file_updater.rb @@ -118,7 +118,7 @@ def initialize filename, collections, meta # NOTICE: Sort keys @collections = @collections.map do |collection| - collection['fields'].sort do |field1, field2| + collection['fields'].sort! do |field1, field2| [field1['field'], field1['type'].inspect] <=> [field2['field'], field2['type'].inspect] end