Do not send notification email on EPP contact:update if contact does not

act as a registrant

Fixes #1161
This commit is contained in:
Artur Beljajev 2019-04-11 18:10:59 +03:00
parent 6a61d7de5b
commit 6fbadaf7f8
4 changed files with 62 additions and 3 deletions

View file

@ -179,7 +179,7 @@ class Epp::Contact < Contact
old_email = email_was
updated = save
if updated && email_changed
if updated && email_changed && registrant?
ContactMailer.email_changed(contact: self, old_email: old_email).deliver_now
end