fix(handler): update default sort retrieval logic
Tests / Unit Tests (push) Failing after 10s
Tests / Integration Tests (push) Failing after 13s
Build , Vet Test, and Lint / Run Vet Tests (1.23.x) (push) Successful in 2m5s
Build , Vet Test, and Lint / Lint Code (push) Failing after 5m44s
Build , Vet Test, and Lint / Build (push) Successful in 7m12s
Build , Vet Test, and Lint / Run Vet Tests (1.24.x) (push) Successful in 8m11s

This commit is contained in:
Hein
2026-07-29 10:23:08 +02:00
parent ef28959c4d
commit a172c73ab0
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -73,7 +73,7 @@ func (h *Handler) getDefaultSort(schema, name string) []common.SortOption {
if h.defaultSort == nil {
return nil
}
if sort, ok := h.defaultSort[defaultSortKey(schema, name)]; ok {
if sort := h.defaultSort[defaultSortKey(schema, name)]; len(sort) > 0 {
return sort
}
return h.defaultSort[defaultSortKey("", "")]
+1 -1
View File
@@ -82,7 +82,7 @@ func (h *Handler) getDefaultSort(schema, name string) []common.SortOption {
if h.defaultSort == nil {
return nil
}
if sort, ok := h.defaultSort[defaultSortKey(schema, name)]; ok {
if sort := h.defaultSort[defaultSortKey(schema, name)]; len(sort) > 0 {
return sort
}
return h.defaultSort[defaultSortKey("", "")]