FIX: don't error out when we receive a bounce associated to a deleted user

This commit is contained in:
Régis Hanol 2016-10-26 10:13:05 +02:00
parent 9ac35f07b9
commit 41f19641d1

View File

@ -133,6 +133,8 @@ class WebhooksController < ActionController::Base
return if email_log.nil?
email_log.update_columns(bounced: true)
return if email_log.user.nil? || email_log.user.email.blank?
Email::Receiver.update_bounce_score(email_log.user.email, bounce_score)
end