FIX: Link post to uploads in PostCreator.

* This ensures that uploads are linked to their post on creation
  instead of a background job which may be delayed if Sidekiq
  is facing difficulties.
This commit is contained in:
Guo Xiang Tan
2018-09-06 09:58:01 +08:00
parent 5baecffb0d
commit 434035f167
8 changed files with 165 additions and 84 deletions

View File

@ -886,7 +886,7 @@ SQL
post.raw = new_raw
post.cooked = post.cook(new_raw)
cpp = CookedPostProcessor.new(post)
cpp.keep_reverse_index_up_to_date
cpp.link_post_uploads
post.custom_fields["import_post_process"] = true
post.save
end