diff --git a/evita_engine/src/main/java/io/evitadb/core/query/extraResult/translator/hierarchyStatistics/producer/HierarchySet.java b/evita_engine/src/main/java/io/evitadb/core/query/extraResult/translator/hierarchyStatistics/producer/HierarchySet.java index c69e75aad..826e46df8 100644 --- a/evita_engine/src/main/java/io/evitadb/core/query/extraResult/translator/hierarchyStatistics/producer/HierarchySet.java +++ b/evita_engine/src/main/java/io/evitadb/core/query/extraResult/translator/hierarchyStatistics/producer/HierarchySet.java @@ -40,6 +40,7 @@ import javax.annotation.Nonnull; import javax.annotation.Nullable; import java.util.Arrays; +import java.util.Collections; import java.util.LinkedList; import java.util.List; import java.util.Locale; @@ -103,7 +104,9 @@ private static List sort(@Nonnull List result, @Nonnull in ) ); } else { - return result; + return Collections.singletonList( + levelInfoToSort[0] + ); } }