From 9e002d923386ccee597eab1cd0e4e57bf9f5c730 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Fri, 14 Mar 2014 11:46:05 +0100 Subject: [PATCH] [FIX] mail.thread: avoid error if `message_unread_count` has been popped 1 line earlier bzr revid: odo@openerp.com-20140314104605-qi7eqj2g37dvxvc3 --- addons/mail/mail_thread.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mail/mail_thread.py b/addons/mail/mail_thread.py index bf3cad538a8..0c911bc51fe 100644 --- a/addons/mail/mail_thread.py +++ b/addons/mail/mail_thread.py @@ -111,7 +111,7 @@ class mail_thread(osv.AbstractModel): if res[id]['message_unread_count']: title = res[id]['message_unread_count'] > 1 and _("You have %d unread messages") % res[id]['message_unread_count'] or _("You have one unread message") res[id]['message_summary'] = "9 %d %s" % (title, res[id].pop('message_unread_count'), _("New")) - res[id].pop('message_unread_count') # remove internal value + res[id].pop('message_unread_count', None) return res def _get_subscription_data(self, cr, uid, ids, name, args, context=None):