fix error

This commit is contained in:
Sam 2013-04-18 11:34:40 +10:00
parent 2a65dd41d4
commit 0c65c4d92e

View File

@ -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))