mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
FIX: PostAlerter should ignore deleted posts
This commit is contained in:
parent
734c272de8
commit
971af6a762
1 changed files with 2 additions and 4 deletions
|
@ -3,10 +3,8 @@ module Jobs
|
|||
|
||||
def execute(args)
|
||||
# maybe it was removed by the time we are making the post
|
||||
if post = Post.find(args[:post_id])
|
||||
# maybe the topic was deleted, so skip in that case as well
|
||||
PostAlerter.post_created(post) if post.topic
|
||||
end
|
||||
post = Post.where(id: args[:post_id]).first
|
||||
PostAlerter.post_created(post) if post && post.topic
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue