mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Do not cook post if Post#raw has not been changed.
This commit is contained in:
@@ -522,7 +522,11 @@ class Post < ActiveRecord::Base
|
||||
|
||||
before_save do
|
||||
self.last_editor_id ||= user_id
|
||||
self.cooked = cook(raw, topic_id: topic_id) unless new_record?
|
||||
|
||||
if !new_record? && raw_changed?
|
||||
self.cooked = cook(raw, topic_id: topic_id)
|
||||
end
|
||||
|
||||
self.baked_at = Time.new
|
||||
self.baked_version = BAKED_VERSION
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user