diff --git a/lib/jobs/process_post.rb b/lib/jobs/process_post.rb index 5451bb7f4..d11d3cb31 100644 --- a/lib/jobs/process_post.rb +++ b/lib/jobs/process_post.rb @@ -7,7 +7,8 @@ module Jobs def execute(args) post = Post.where(id: args[:post_id]).first - return unless post.present? + # two levels of deletion + return unless post.present? && post.topic.present? if args[:cook].present? post.update_column(:cooked, post.cook(post.raw, topic_id: post.topic_id))