mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
do not alert on deleted posts
This commit is contained in:
parent
b7e7da766d
commit
6fab03b777
1 changed files with 4 additions and 2 deletions
|
@ -2,9 +2,11 @@ module Jobs
|
|||
class PostAlert < Jobs::Base
|
||||
|
||||
def execute(args)
|
||||
post = Post.find(args[:post_id])
|
||||
# maybe it was removed by the time we are making the post
|
||||
if post = Post.find_by(id: args[:post_id])
|
||||
PostAlerter.post_created(post)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue