diff --git a/app/jobs/regular/post_alert.rb b/app/jobs/regular/post_alert.rb index 99b1860c5f2..6d319b75a10 100644 --- a/app/jobs/regular/post_alert.rb +++ b/app/jobs/regular/post_alert.rb @@ -2,8 +2,10 @@ module Jobs class PostAlert < Jobs::Base def execute(args) - post = Post.find(args[:post_id]) - PostAlerter.post_created(post) + # 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