mirror of
https://github.com/discourse/discourse.git
synced 2025-02-08 04:18:23 +00:00
Do not alert if we have no topic (eg topic deleted)
This commit is contained in:
parent
ca2309c6ec
commit
bbd5452b8d
@ -4,7 +4,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_by(id: args[:post_id])
|
if post = Post.find_by(id: args[:post_id])
|
||||||
PostAlerter.post_created(post)
|
# maybe the topic was deleted, so skip in that case as well
|
||||||
|
PostAlerter.post_created(post) if post.topic
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user