Skip to content

Commit 95be1ed

Browse files
committed
Fix spec
1 parent 5692d34 commit 95be1ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/api/api_v2/years.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def stats_for(period)
7979
else
8080
shows.during_year(period)
8181
end
82-
cover_art_urls = Show.find_by(date: COVER_ART[period]).cover_art_urls
82+
cover_art_urls = Show.find_by(date: COVER_ART[period])&.cover_art_urls
8383
[ shows.count, shows.select(:venue_id).distinct.count, shows.sum(:duration), cover_art_urls ]
8484
end
8585
end

0 commit comments

Comments
 (0)