mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 07:38:06 +08:00
FIX: nil the baked version after moving the posts. (#14483)
Previosuly, quotes from original topics are rendered incorrectly since the moved posts are not rebaked. Co-authored-by: Alan Guo Xiang Tan <gxtan1990@gmail.com>
This commit is contained in:
@ -732,12 +732,11 @@ class Post < ActiveRecord::Base
|
||||
before_save do
|
||||
self.last_editor_id ||= user_id
|
||||
|
||||
if !new_record? && will_save_change_to_raw?
|
||||
self.cooked = cook(raw, topic_id: topic_id)
|
||||
if will_save_change_to_raw?
|
||||
self.cooked = cook(raw, topic_id: topic_id) if !new_record?
|
||||
self.baked_at = Time.zone.now
|
||||
self.baked_version = BAKED_VERSION
|
||||
end
|
||||
|
||||
self.baked_at = Time.zone.now
|
||||
self.baked_version = BAKED_VERSION
|
||||
end
|
||||
|
||||
def advance_draft_sequence
|
||||
|
Reference in New Issue
Block a user