From d7b7b07f9e9ead98d6ecc3e5ce3dca4d4a4a2b6f Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Fri, 12 Aug 2016 10:33:19 +0200 Subject: [PATCH] [FIX] mail: avoid errors in /longpolling/poll requests When a request fail due to a database concurrency error, the request is replayed. However, the `mail` overwrite of /longpolling/poll requests modified its arguments inplace, which lead to a sanity check to failed in case of retry. Fixes #13121 --- addons/mail/controllers/bus.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/mail/controllers/bus.py b/addons/mail/controllers/bus.py index e07248ff6fc..96d092f97b4 100644 --- a/addons/mail/controllers/bus.py +++ b/addons/mail/controllers/bus.py @@ -23,6 +23,7 @@ class MailChatController(openerp.addons.bus.controllers.main.BusController): partner_id = request.env.user.partner_id.id if partner_id: + channels = list(channels) # do not alter original list for mail_channel in request.env['mail.channel'].search([('channel_partner_ids', 'in', [partner_id])]): channels.append((request.db, 'mail.channel', mail_channel.id)) # personal and needaction channel