don't run mailing list if mailing list mode is disabled

This commit is contained in:
Sam 2016-03-22 14:50:35 +11:00
parent d09a20210b
commit a202ec2028

View File

@ -3,6 +3,8 @@ module Jobs
class NotifyMailingListSubscribers < Jobs::Base
def execute(args)
return if SiteSetting.disable_mailing_list_mode
post_id = args[:post_id]
post = post_id ? Post.with_deleted.find_by(id: post_id) : nil