mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-18 03:25:31 -05:00
Merge pull request #3033 from verdi327/account_for_deleted_topic
[bug fix] Use with_deleted when looking up soft deleted topics for recovery
This commit is contained in:
commit
eb14a6d294
1 changed files with 3 additions and 2 deletions
|
@ -54,8 +54,9 @@ class PostDestroyer
|
||||||
elsif @user.staff? || @user.id == @post.user_id
|
elsif @user.staff? || @user.id == @post.user_id
|
||||||
user_recovered
|
user_recovered
|
||||||
end
|
end
|
||||||
@post.topic.recover! if @post.post_number == 1
|
topic = Topic.with_deleted.find @post.topic_id
|
||||||
@post.topic.update_statistics
|
topic.recover! if @post.post_number == 1
|
||||||
|
topic.update_statistics
|
||||||
end
|
end
|
||||||
|
|
||||||
def staff_recovered
|
def staff_recovered
|
||||||
|
|
Loading…
Reference in a new issue