mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 15:28:37 +08:00
FIX: Should be able to recover a user deleted post if raw didn't change
This commit is contained in:
@ -188,7 +188,9 @@ class PostDestroyer
|
||||
|
||||
# has internal transactions, if we nest then there are some very high risk deadlocks
|
||||
last_revision = @post.revisions.last
|
||||
@post.revise(@user, { raw: last_revision.modifications["raw"][0] }, force_new_version: true) if last_revision.present?
|
||||
if last_revision.present? && last_revision.modifications['raw'].present?
|
||||
@post.revise(@user, { raw: last_revision.modifications["raw"][0] }, force_new_version: true)
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
Reference in New Issue
Block a user