From c3a0819248ff439a5d34b2d539837aa17b61acf9 Mon Sep 17 00:00:00 2001 From: Claudio Ortolina Date: Fri, 26 Sep 2025 11:33:34 +0300 Subject: [PATCH] Stabilize order of records on this day --- lib/music_library/collection.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/music_library/collection.ex b/lib/music_library/collection.ex index 76481853..1e5dcc0a 100644 --- a/lib/music_library/collection.ex +++ b/lib/music_library/collection.ex @@ -47,7 +47,7 @@ defmodule MusicLibrary.Collection do from r in Record, where: not is_nil(r.purchased_at), where: fragment("strftime('%m-%d', ?) = ?", r.release_date, ^month_day), - order_by: [desc: r.release_date], + order_by: [{:desc, r.release_date}, order_alphabetically()], select: ^Records.essential_fields() Repo.all(q)