[FIX] mail: fix issue when computing `_get_recipient_data`

If we call ``MailFollowers._get_recipient_data()`` with pids parameter being
set to None there is a crash that is easily solved( list(None), should take
list fallback before hand).

Task-2739294 (Mail: Batch recipients fetch and improve its usage)

Part-of: odoo/odoo#82167
This commit is contained in:
Thibault Delavallée
2022-01-31 17:47:31 +00:00
parent 2ad668d578
commit ccc35f5ab6
+1 -1
View File
@@ -136,7 +136,7 @@ SELECT DISTINCT ON (pid) * FROM (
) AS x
ORDER BY pid, notif
"""
params = [subtype_id, records._name, tuple(records.ids), list(pids) or []]
params = [subtype_id, records._name, tuple(records.ids), list(pids or [])]
self.env.cr.execute(query, tuple(params))
res = self.env.cr.fetchall()
elif pids: