diff options
Diffstat (limited to 'addons/mail/mail_thread.py')
| -rw-r--r-- | addons/mail/mail_thread.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/addons/mail/mail_thread.py b/addons/mail/mail_thread.py index 0dcfc6d5f68..eabd486d580 100644 --- a/addons/mail/mail_thread.py +++ b/addons/mail/mail_thread.py @@ -311,6 +311,9 @@ class mail_thread(osv.AbstractModel): cascaded, because link is done through (res_model, res_id). """ msg_obj = self.pool.get('mail.message') fol_obj = self.pool.get('mail.followers') + + if isinstance(ids, (int, long)): + ids = [ids] # delete messages and notifications msg_ids = msg_obj.search(cr, uid, [('model', '=', self._name), ('res_id', 'in', ids)], context=context) msg_obj.unlink(cr, uid, msg_ids, context=context) |
