From 95be1eda2436a1fd9abb3f001b2c96e39eb7d540 Mon Sep 17 00:00:00 2001 From: "Justin Craig-Kuhn (JCK)" Date: Fri, 8 Nov 2024 11:22:45 -0800 Subject: [PATCH] Fix spec --- app/api/api_v2/years.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/api/api_v2/years.rb b/app/api/api_v2/years.rb index 6e1d8a62..7f17f613 100644 --- a/app/api/api_v2/years.rb +++ b/app/api/api_v2/years.rb @@ -79,7 +79,7 @@ def stats_for(period) else shows.during_year(period) end - cover_art_urls = Show.find_by(date: COVER_ART[period]).cover_art_urls + cover_art_urls = Show.find_by(date: COVER_ART[period])&.cover_art_urls [ shows.count, shows.select(:venue_id).distinct.count, shows.sum(:duration), cover_art_urls ] end end