summaryrefslogtreecommitdiff
path: root/addons/snailmail
diff options
context:
space:
mode:
authorSébastien Theys <seb@odoo.com>2021-01-18 16:49:01 +0000
committerSébastien Theys <seb@odoo.com>2021-01-18 16:59:02 +0000
commite995f03a9a55280b1e9173223cdfa619ae164cc3 (patch)
tree3aefcd4e4621f11cc971a652d7ed6f01a70765c0 /addons/snailmail
parent20d6efa817a4d839777c81d403bb8770807e784a (diff)
[FIX] mail, im_livechat, snailmail: use findFromIdentifyingData
find is O(n) and findFromIdentifyingData is O(1) task-2440693 closes odoo/odoo#64712 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Diffstat (limited to 'addons/snailmail')
-rw-r--r--addons/snailmail/static/src/components/message/message_tests.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/snailmail/static/src/components/message/message_tests.js b/addons/snailmail/static/src/components/message/message_tests.js
index 69c16c571f5..67044509812 100644
--- a/addons/snailmail/static/src/components/message/message_tests.js
+++ b/addons/snailmail/static/src/components/message/message_tests.js
@@ -638,7 +638,7 @@ QUnit.test('Missing Required Fields', async function (assert) {
hasThreadView: true,
thread: [['insert', { id: 20, model: 'res.partner' }]],
});
- const message = this.env.models['mail.message'].find(message => message.id === 10);
+ const message = this.env.models['mail.message'].findFromIdentifyingData({ id: 10 });
await this.createMessageComponent(message, {
threadViewLocalId: threadViewer.threadView.localId,
});