From 33577e2186944cc9d58362ca546bef2a4816bf10 Mon Sep 17 00:00:00 2001 From: BrokenEagle Date: Sat, 20 Jun 2020 08:53:19 +0000 Subject: [PATCH] Don't display artist wiki when it is deleted, and vice-versa --- app/views/artists/_show.html.erb | 2 +- app/views/wiki_pages/show.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/artists/_show.html.erb b/app/views/artists/_show.html.erb index 3e7a65bec..5352fc333 100644 --- a/app/views/artists/_show.html.erb +++ b/app/views/artists/_show.html.erb @@ -8,7 +8,7 @@ <% if @artist.is_banned? && !policy(@artist).can_view_banned? %>

The artist requested removal of this page.

<% else %> - <% if @artist.wiki_page.present? %> + <% if @artist.wiki_page.present? && !@artist.wiki_page.is_deleted %>
<%= format_text(@artist.wiki_page.body, :disable_mentions => true) %>
diff --git a/app/views/wiki_pages/show.html.erb b/app/views/wiki_pages/show.html.erb index de2863565..9596e045b 100644 --- a/app/views/wiki_pages/show.html.erb +++ b/app/views/wiki_pages/show.html.erb @@ -28,7 +28,7 @@ <%= format_text(@wiki_page.body) %> <% end %> - <% if @wiki_page.artist %> + <% if @wiki_page.artist.present? && !@wiki_page.artist.is_deleted %>

<%= link_to "View artist", @wiki_page.artist %>

<% end %>