Fix exception on error page when handling PG::AmbiguousColumn error.

Fix an exception on the error page when a controller index action raised
an PG::AmbiguousColumn error because the model `search` method generated
SQL with an ambiguous column reference. In this case the error page
tried to generate data attributes for the <body> tag, but this failed
because evaluating the `current_item` raised an exception again.
This commit is contained in:
evazion
2022-03-01 17:09:31 -06:00
parent 99221af855
commit ece0b1b17d
2 changed files with 15 additions and 6 deletions

View File

@@ -57,7 +57,7 @@
<%= yield :html_header %>
<%= raw Danbooru.config.custom_html_header_content %>
</head>
<%= tag.body **body_attributes(CurrentUser.user, params, @current_item) do %>
<%= tag.body **body_attributes(CurrentUser.user, params, @current_item, @exception) do %>
<%= render "news_updates/listing" %>
<header id="top" class="mb-4">