mirror of https://github.com/OCA/social.git
[FIX] mail_show_follower: failure when partner has more than 1 user
In the highly improbable but actually possible and real world case that a partner has more than one user associated, this change makes the emails able to send. @moduon MT-1634pull/1570/head
parent
fde7c36c4b
commit
fb95064ecb
|
@ -114,7 +114,10 @@ class MailMail(models.Model):
|
||||||
if cc_internal:
|
if cc_internal:
|
||||||
partners = partners_obj.filtered(
|
partners = partners_obj.filtered(
|
||||||
lambda x: x.id not in user_partner_ids
|
lambda x: x.id not in user_partner_ids
|
||||||
and (not x.user_ids or x.user_ids.show_in_cc)
|
and (
|
||||||
|
not x.user_ids
|
||||||
|
or any(x.mapped("user_ids.show_in_cc"))
|
||||||
|
)
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
partners = partners_obj.filtered(
|
partners = partners_obj.filtered(
|
||||||
|
|
Loading…
Reference in New Issue