mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
fix error
This commit is contained in:
parent
2a65dd41d4
commit
0c65c4d92e
1 changed files with 2 additions and 1 deletions
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue