FIX: don't error out when we receive a bounce associated to a deleted user
This commit is contained in:
parent
9ac35f07b9
commit
41f19641d1
|
@ -133,6 +133,8 @@ class WebhooksController < ActionController::Base
|
||||||
return if email_log.nil?
|
return if email_log.nil?
|
||||||
|
|
||||||
email_log.update_columns(bounced: true)
|
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)
|
Email::Receiver.update_bounce_score(email_log.user.email, bounce_score)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue