Browse Source

[FIX] mass_mailing_partner: Don't check if no category

Following 4de3795, as now `tag_ids` are not lost, the comparison is incorrect due to
partner not having category_id, and then keep it previous tags in mass mailing contact.
We add this check for avoiding problems.
pull/374/head
Pedro M. Baeza 6 years ago
parent
commit
cd7bfba47c
  1. 5
      mass_mailing_partner/tests/base.py

5
mass_mailing_partner/tests/base.py

@ -52,5 +52,6 @@ class BaseCase(TransactionCase):
mailing_contact.company_name) mailing_contact.company_name)
self.assertEqual(mailing_contact.partner_id.country_id, self.assertEqual(mailing_contact.partner_id.country_id,
mailing_contact.country_id) mailing_contact.country_id)
self.assertEqual(mailing_contact.partner_id.category_id,
mailing_contact.tag_ids)
if mailing_contact.partner_id.category_id:
self.assertEqual(mailing_contact.partner_id.category_id,
mailing_contact.tag_ids)
Loading…
Cancel
Save