[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
This commit is contained in:
Christophe Simonis
2016-08-12 10:45:43 +02:00
parent d1663f06e7
commit d7b7b07f9e
+1
View File
@@ -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