Skip to content
Snippets Groups Projects
Commit e67b3feb authored by Robert Goldmann's avatar Robert Goldmann
Browse files

Fixed #550 - categories are sorted case sensitive

parent f5ef0d1f
No related branches found
No related tags found
No related merge requests found
Pipeline #3713 failed
......@@ -9,8 +9,10 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Comparator;
import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;
@Service
public class CategoryService implements Resetable
......@@ -89,7 +91,9 @@ public class CategoryService implements Resetable
public List<Category> getAllCategories()
{
localizeDefaultCategories();
return categoryRepository.findAllByOrderByNameAsc();
return categoryRepository.findAllByOrderByNameAsc().stream()
.sorted(Comparator.comparing(c -> c.getName().toLowerCase()))
.collect(Collectors.toList());
}
public void localizeDefaultCategories()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment