Skip to content

Commit

Permalink
Fix fetching audits when handling errors
Browse files Browse the repository at this point in the history
  • Loading branch information
redmvc committed Jan 5, 2025
1 parent 1562e1b commit 24388da
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/controllers/replies_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,8 @@ def edit_reply(editing_multi_reply, new_multi_reply: nil)
render_errors(errored_reply, action: 'updated', now: true, err: e)
end

@audits = { @reply.id => @reply.post.audits.count }
@post ||= @reply.post
@audits = { @reply.id => @post.audits.count }
editor_setup
render :edit
else
Expand Down

0 comments on commit 24388da

Please sign in to comment.