mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -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)
|
def execute(args)
|
||||||
# maybe it was removed by the time we are making the post
|
# maybe it was removed by the time we are making the post
|
||||||
if post = Post.find(args[:post_id])
|
post = Post.where(id: args[:post_id]).first
|
||||||
# maybe the topic was deleted, so skip in that case as well
|
PostAlerter.post_created(post) if post && post.topic
|
||||||
PostAlerter.post_created(post) if post.topic
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue