# No email notifications for posts that require approval

**URL:** <https://meta.discourse.org/t/no-email-notifications-for-posts-that-require-approval/48792>\
**Category:** Bug\
**Created:** [18.Август.2016 10:34:10 UTC](https://meta.discourse.org/t/no-email-notifications-for-posts-that-require-approval/48792 "2016-08-18T10:34:10Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![msokk](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/msokk/32/121584_2.png) [@msokk](https://meta.discourse.org/u/msokk)\
**Post date:** [23.Август.2016 12:19:32 UTC](https://meta.discourse.org/t/no-email-notifications-for-posts-that-require-approval/48792/5 "2016-08-23T12:19:32Z")

</div>

I looked into the code and after some debugging, found out that [PostAlert](https://github.com/discourse/discourse/blob/master/app/jobs/regular/post_alert.rb#L6) job skipped running the  
`PostAlerter.post_created(post) if post && post.topic` line as the post was not yet commited to database due to [QueuedPost wrapping the whole thing into a transaction](https://github.com/discourse/discourse/blob/master/app/models/queued_post.rb#L64).

I’ll be delaying the jobs by a few seconds as a workaround, but I think that is not a real fix to this or is it?

---

_[View the full topic](https://meta.discourse.org/t/no-email-notifications-for-posts-that-require-approval/48792)._
