diff options
| author | Jeremy Kersten <jke@odoo.com> | 2020-03-26 18:06:57 +0000 |
|---|---|---|
| committer | Romain Derie <rde@odoo.com> | 2020-03-26 18:12:47 +0000 |
| commit | 1606d22d40cd431a02e73bb0661a192bb12edf85 (patch) | |
| tree | 7a59fed29a3248d886655d948cd3e28486c12ff5 /addons/website/tests/test_performance.py | |
| parent | 6d6b505598413b0d766a8394c7131351ade64266 (diff) | |
[FIX] base: perf - binary_record, don't rebrowse ir.attachment
If model is already an ir.attachment we don't need to do a new search_read.
We can use it record directly.
After this commit, we don't do extra request if we already have the info,
else we don't change the behavior.
task-2211013
Diffstat (limited to 'addons/website/tests/test_performance.py')
| -rw-r--r-- | addons/website/tests/test_performance.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/website/tests/test_performance.py b/addons/website/tests/test_performance.py index b7683e96068..0cbc7ce214d 100644 --- a/addons/website/tests/test_performance.py +++ b/addons/website/tests/test_performance.py @@ -119,4 +119,4 @@ class TestWebsitePerformance(UtilPerf): # assets route /web/content/.. self.url_open('/') # create assets attachments assets_url = self.env['ir.attachment'].search([('url', '=like', '/web/content/%/web.assets_common%.js')], limit=1).url - self.assertEqual(self._get_url_hot_query(assets_url), 3) + self.assertEqual(self._get_url_hot_query(assets_url), 2) |
