mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: NotifyMailingListSubscribers can handle trashed posts, instead of raising an error and retrying
This commit is contained in:
parent
e48cf06fc9
commit
d8ebeef857
@ -4,7 +4,10 @@ module Jobs
|
||||
|
||||
def execute(args)
|
||||
post_id = args[:post_id]
|
||||
post = Post.find(post_id) if post_id
|
||||
if post_id
|
||||
post = Post.with_deleted.where(id: post_id).first
|
||||
return if post && post.trashed?
|
||||
end
|
||||
|
||||
raise Discourse::InvalidParameters.new(:post_id) unless post
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user