Maintenance: Not having an active Email::Notification is a valid use case.

This commit is contained in:
Thorsten Eckel 2019-08-21 14:55:26 +02:00 committed by Martin Edenhofer
parent 08a98efca4
commit ffa2b61087

View file

@ -133,6 +133,12 @@ returns
# get active Email::Outbound Channel and send
channel = Channel.find_by(area: 'Email::Notification', active: true)
if channel.blank?
Rails.logger.info "Can't find an active 'Email::Notification' channel. Canceling notification sending."
return
end
channel.deliver(
{
# in_reply_to: in_reply_to,