diff options
| author | Denis Ledoux <dle@odoo.com> | 2019-02-04 14:08:48 +0000 |
|---|---|---|
| committer | Raphael Collet <rco@odoo.com> | 2019-02-11 15:50:51 +0000 |
| commit | ce0575ef274ec6419ffb08211461e7bdcbed1019 (patch) | |
| tree | 83dcd23d1fcf4b3eedd462603e684a5fc7a1eb2c /addons/web/static/src/js/views/basic/basic_controller.js | |
| parent | dcc752aaabc10aee8bbccc1474b43d224b57023c (diff) | |
[IMP] models: faster ensure_one implementation
Calling `len` on a long list and checking that its value is 1 is slower than
just unpacking the list. The point is to check whether there is just one item
in the list, and counting all items just for that is a bit overkill.
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_controller.js')
0 files changed, 0 insertions, 0 deletions
