From e7eeb2c5b6052b80a00b10aed328ebde2330a9e1 Mon Sep 17 00:00:00 2001 From: eLBati Date: Fri, 15 Oct 2021 16:35:52 +0200 Subject: [PATCH] FIX mail_show_follower: ValueError: Expected singleton: res.users --- mail_show_follower/models/mail_mail.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mail_show_follower/models/mail_mail.py b/mail_show_follower/models/mail_mail.py index b06a6fc..4e2e420 100755 --- a/mail_show_follower/models/mail_mail.py +++ b/mail_show_follower/models/mail_mail.py @@ -32,7 +32,8 @@ class MailMail(models.Model): ).mapped('partner_id').ids partners_len = len(partners_obj.filtered( lambda x: x.id not in user_partner_ids and ( - not x.user_ids or group_portal in x.user_ids.groups_id + not x.user_ids or + group_portal in x.user_ids.mapped("groups_id") ))) if partners_len > 1: # get partners @@ -54,7 +55,7 @@ class MailMail(models.Model): partners = partners_obj.filtered( lambda x: x.id not in user_partner_ids and ( not x.user_ids or group_portal in - x.user_ids.groups_id + x.user_ids.mapped("groups_id") ) ) partners = partners.filtered(