mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-04-16 17:05:09 -04:00
don't attempt to send emails on deleted topics
This commit is contained in:
parent
dc06401479
commit
b329e23f85
1 changed files with 2 additions and 1 deletions
|
@ -6,7 +6,8 @@ module Jobs
|
|||
post_id = args[:post_id]
|
||||
if post_id
|
||||
post = Post.with_deleted.find_by(id: post_id)
|
||||
return if post && post.trashed?
|
||||
# our topic can be deleted as well
|
||||
return if (post && post.trashed?) || !post.topic
|
||||
end
|
||||
|
||||
raise Discourse::InvalidParameters.new(:post_id) unless post
|
||||
|
|
Loading…
Add table
Reference in a new issue