diff --git a/lib/post_destroyer.rb b/lib/post_destroyer.rb index 9bba2444d..ae4e6a558 100644 --- a/lib/post_destroyer.rb +++ b/lib/post_destroyer.rb @@ -54,8 +54,9 @@ class PostDestroyer elsif @user.staff? || @user.id == @post.user_id user_recovered end - @post.topic.recover! if @post.post_number == 1 - @post.topic.update_statistics + topic = Topic.with_deleted.find @post.topic_id + topic.recover! if @post.post_number == 1 + topic.update_statistics end def staff_recovered