Make online store templates ordering case-insensitive

This commit is contained in:
Claudio Ortolina
2025-07-15 13:51:09 +01:00
parent 9765ba50b5
commit 4add3859fd
+2 -2
View File
@@ -13,7 +13,7 @@ defmodule MusicLibrary.OnlineStoreTemplates do
def list_enabled_templates do
OnlineStoreTemplate
|> where([t], t.enabled == true)
|> order_by([t], asc: t.name)
|> order_by([t], fragment("? COLLATE NOCASE ASC", t.name))
|> Repo.all()
end
@@ -22,7 +22,7 @@ defmodule MusicLibrary.OnlineStoreTemplates do
"""
def list_templates do
OnlineStoreTemplate
|> order_by([t], asc: t.name)
|> order_by([t], fragment("? COLLATE NOCASE ASC", t.name))
|> Repo.all()
end