From b5b5cc77bd6df49235871ae8e8be6e4ff6924dd6 Mon Sep 17 00:00:00 2001 From: evazion Date: Fri, 11 Feb 2022 17:42:21 -0600 Subject: [PATCH] artists: fix exception in /artists/show_or_new?name=does_not_exist Fix exception in /artists/show_or_new?name=does_not_exist when the tag doesn't exist. --- app/views/artists/_summary.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/artists/_summary.html.erb b/app/views/artists/_summary.html.erb index 0b5dcc233..26c1d40c6 100644 --- a/app/views/artists/_summary.html.erb +++ b/app/views/artists/_summary.html.erb @@ -11,7 +11,7 @@ <%= link_to artist.pretty_name, posts_path(tags: artist.name), class: [tag_class(artist.tag), "heading text-xl"] %> - <%= artist.tag.post_count %> + <%= artist.tag&.post_count %> <% if artist.is_banned? && !policy(artist).can_view_banned? %>