From e7b1b20e60af5801a0a1cd42b7ad2fa27e2b7d09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 19 Apr 2022 23:17:51 +0200 Subject: [PATCH] Do not request model notifications if they are already empty issue11411 review388371002 --- src/common.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common.js b/src/common.js index 67f1d6e2f7..f16bf4e7c8 100644 --- a/src/common.js +++ b/src/common.js @@ -555,7 +555,7 @@ Sao.common.ModelNotification = Sao.class_(Object, { init: function() { - this._depends = {}; + this._depends = null; }, load_names: function() { this._depends = Sao.rpc({ @@ -564,7 +564,7 @@ }, Sao.Session.current_session, false); }, get: function(model) { - if (jQuery.isEmptyObject(this._depends)) { + if (!this._depends) { this.load_names(); } return this._depends[model] || [];