[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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user