DEV: Make find_post_using raise only Discourse::NotFound (#16133)

This commit is contained in:
Jarek Radosz
2022-03-08 17:39:52 +01:00
committed by GitHub
parent c212af665c
commit 768c80c2a4
2 changed files with 7 additions and 1 deletions

View File

@@ -869,7 +869,7 @@ class PostsController < ApplicationController
post = finder.with_deleted.first
raise Discourse::NotFound unless post
post.topic = Topic.with_deleted.find(post.topic_id)
post.topic = Topic.with_deleted.find_by(id: post.topic_id)
if !post.topic ||
(