[PR #87] [MERGED] fix: sort base collections before additional using CASE expression #90

Closed
opened 2026-08-13 19:11:28 +02:00 by zaph0d · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/niels-emmer/myace/pull/87
Author: @niels-emmer
Created: 8/12/2026
Status: Merged
Merged: 8/12/2026
Merged by: @niels-emmer

Base: mainHead: fix/collection-type-sort


📝 Commits (1)

  • 138b729 fix: sort base collections before additional using CASE expression

📊 Changes

1 file changed (+10 additions, -3 deletions)

View changed files

📝 backend/app/api/collections.py (+10 -3)

📄 Description

Summary

Alphabetical sort on collection_type puts 'additional' before 'base' (a < b). Uses a SQL CASE expression to map base→0, additional→1 for the correct order.

Changes

File Change
backend/app/api/collections.py Sort by CASE WHEN collection_type='base' THEN 0 ELSE 1 END, name ASC

Testing

  • Backend: community collection tests pass (12/12)

Checklist

  • Self-review completed
  • No new warnings
  • Tests pass
  • Breaking changes: none

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/niels-emmer/myace/pull/87 **Author:** [@niels-emmer](https://github.com/niels-emmer) **Created:** 8/12/2026 **Status:** ✅ Merged **Merged:** 8/12/2026 **Merged by:** [@niels-emmer](https://github.com/niels-emmer) **Base:** `main` ← **Head:** `fix/collection-type-sort` --- ### 📝 Commits (1) - [`138b729`](https://github.com/niels-emmer/myace/commit/138b729fcf914c152fe4f015d242fbd51e9e2831) fix: sort base collections before additional using CASE expression ### 📊 Changes **1 file changed** (+10 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `backend/app/api/collections.py` (+10 -3) </details> ### 📄 Description ## Summary Alphabetical sort on `collection_type` puts 'additional' before 'base' (a < b). Uses a SQL CASE expression to map base→0, additional→1 for the correct order. ## Changes | File | Change | |------|--------| | `backend/app/api/collections.py` | Sort by `CASE WHEN collection_type='base' THEN 0 ELSE 1 END, name ASC` | ## Testing - Backend: community collection tests pass (12/12) ## Checklist - [x] Self-review completed - [x] No new warnings - [x] Tests pass - [x] Breaking changes: none --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
zaph0d 2026-08-13 19:11:28 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
github-mirrors/myace#90
No description provided.