Don't show reactions to missing reactables (#15249)
Solves an issue where a moderator 'vomit' action on a subsequently deleted user causes the privileged reactions page to raise a NoMethodError accessing the reactable's details. I tried to accomplish this in the controller but it seems the `paginate` helper requires a relation rather than an array.
This commit is contained in:
parent
02b1a5eb75
commit
09eda6a0cc
1 changed files with 1 additions and 1 deletions
|
|
@ -30,7 +30,7 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody class="crayons-card">
|
||||
<% @privileged_reactions.each do |reaction| %>
|
||||
<% @privileged_reactions.select(&:reactable).each do |reaction| %>
|
||||
<tr>
|
||||
<td class="whitespace-nowrap"><%= reaction.id %></td>
|
||||
<td><%= link_to reaction.user.username, admin_user_path(reaction.user_id) %></td>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue