Make application work with empty database

This commit is contained in:
Claudio Ortolina
2025-11-19 10:16:21 +00:00
parent d074bd5332
commit a597ff4032
6 changed files with 54 additions and 3 deletions
@@ -13,7 +13,7 @@ defmodule MusicLibraryWeb.StatsLive.Index do
def mount(_params, _session, socket) do
current_date = DateTime.now!(socket.assigns.timezone) |> DateTime.to_date()
latest_record = Collection.get_latest_record!()
latest_record = Collection.get_latest_record()
records_by_artists = Collection.count_records_by_artist(limit: 20)
records_by_genre = Collection.count_records_by_genre(limit: 20)
records_on_this_day = Collection.get_records_on_this_day(current_date)