mirror of https://github.com/OCA/social.git
[IMP] mass_mailing_unique: informative constraint
parent
529240921a
commit
4bd9a0b492
|
@ -18,5 +18,7 @@ class MailMassMailingContact(models.Model):
|
|||
contact_email = contact.email.strip().lower()
|
||||
other_emails = [e.strip().lower() for e in others.mapped('email')]
|
||||
if contact_email in other_emails:
|
||||
raise ValidationError(_("Cannot have the same email more "
|
||||
"than once in the same list"))
|
||||
raise ValidationError(_(
|
||||
"Cannot have the same email (%s) more"
|
||||
"than once in the same list." % contact_email
|
||||
))
|
||||
|
|
Loading…
Reference in New Issue