Revert `update_columns` -> `update!` when rebaking/post-processing post.
`update!` goes through validation which means old posts that doesn't adhere to the existing validations will raise an error.
This commit is contained in:
parent
2a69ab4a4c
commit
8794d940d3
|
@ -32,7 +32,7 @@ module Jobs
|
|||
# TODO suicide if needed, let's gather a few here first
|
||||
Rails.logger.warn("Cooked post processor in FATAL state, bypassing. You need to urgently restart sidekiq\norig: #{orig_cooked}\nrecooked: #{recooked}\ncooked: #{cooked}\npost id: #{post.id}")
|
||||
else
|
||||
post.update!(cooked: cp.html)
|
||||
post.update_column(:cooked, cp.html)
|
||||
extract_links(post)
|
||||
post.publish_change_to_clients! :revised
|
||||
end
|
||||
|
|
|
@ -603,7 +603,7 @@ class Post < ActiveRecord::Base
|
|||
new_cooked = cook(raw, topic_id: topic_id, invalidate_oneboxes: invalidate_oneboxes)
|
||||
old_cooked = cooked
|
||||
|
||||
self.update!(
|
||||
update_columns(
|
||||
cooked: new_cooked,
|
||||
baked_at: Time.zone.now,
|
||||
baked_version: BAKED_VERSION
|
||||
|
|
Loading…
Reference in New Issue