changeset e96c1f9846a9 in sao:default
details: https://hg.tryton.org/sao?cmd=changeset&node=e96c1f9846a9
description:
Do not make a global search call for empty string
issue10886
review344971002
diffstat:
src/sao.js | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diffs (13 lines):
diff -r 0fb9992f4557 -r e96c1f9846a9 src/sao.js
--- a/src/sao.js Sun Oct 31 10:42:08 2021 +0100
+++ b/src/sao.js Sun Oct 31 10:43:33 2021 +0100
@@ -947,6 +947,9 @@
},
update: function(text) {
var ir_model = new Sao.Model('ir.model');
+ if (!text) {
+ return jQuery.when([]);
+ }
return ir_model.execute('global_search',
[text, Sao.config.limit, Sao.main_menu_screen.model_name],
Sao.main_menu_screen.context)