summaryrefslogtreecommitdiff
path: root/addons/mail/models/mail_thread.py
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2018-11-29 18:38:55 +0100
committerChristophe Simonis <chs@odoo.com>2018-11-29 18:38:55 +0100
commitf5c3dafb045f4eb5e832c45596dd59396667ea09 (patch)
tree8265091d53c54dfa47e5a67f00e98cfda404ade2 /addons/mail/models/mail_thread.py
parent5644ab53ab6f370a2fb48242e22702655afd6655 (diff)
parentc0eef4271110ebcab07811328a7b3f4309fb4d06 (diff)
[MERGE] forward port branch saas-11.3 up to c0eef427111
Diffstat (limited to 'addons/mail/models/mail_thread.py')
-rw-r--r--addons/mail/models/mail_thread.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/addons/mail/models/mail_thread.py b/addons/mail/models/mail_thread.py
index f7cddd2525d..a1294502c1d 100644
--- a/addons/mail/models/mail_thread.py
+++ b/addons/mail/models/mail_thread.py
@@ -199,6 +199,8 @@ class MailThread(models.AbstractModel):
@api.multi
def _get_message_needaction(self):
res = dict((res_id, 0) for res_id in self.ids)
+ if not res:
+ return
# search for unread messages, directly in SQL to improve performances
self._cr.execute(""" SELECT msg.res_id FROM mail_message msg