Skip to content
Snippets Groups Projects
Commit fe13606c authored by Florent de Labarre's avatar Florent de Labarre Committed by Thibault Delavallée
Browse files

[FIX] mail: prevent useless write when pinning a channel

When having an active livechat, we could end up with a lot of query errors
like

```
2021-08-30 [...] "POST /web/dataset/call_kw/mail.channel/channel_get HTTP/1.0" 200 - 104 0.151 0.075
2021-08-30 [...] ERROR production odoo.sql_db: bad query: UPDATE
  "mail_channel_partner" SET "write_uid"=2,"write_date"=(now() at time zone
  'UTC') WHERE id IN (365007)

ERROR: ERROR:  Could not serialize access due to concurrent update
```

Avoiding unnecessary writes helps reducing concurrent updates.

Task-2641572
PR odoo#76159
Closes odoo#75745

Part-of: odoo/odoo#76159
parent e6499b3b
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment