changeset d32a1b5e5be1 in sao:default
details: https://hg.tryton.org/sao?cmd=changeset;node=d32a1b5e5be1
description:
        Allow all models for reference if there is no restriction

        If the allowed models is empty, it means that there is no constraint on 
the
        reference model. So we must allow all of them.

        issue8300
        review275311002
diffstat:

 src/common.js |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (13 lines):

diff -r 083558ade510 -r d32a1b5e5be1 src/common.js
--- a/src/common.js     Wed Apr 24 23:45:06 2019 +0200
+++ b/src/common.js     Fri Apr 26 12:04:10 2019 +0200
@@ -712,7 +712,8 @@
 
         var _model_evaluator = function(allowed_models) {
             return function(value) {
-                return ~allowed_models.indexOf(value[0]);
+                return ~allowed_models.indexOf(value[0]) ||
+                    jQuery.isEmptyObject(allowed_models);
             };
         };
 

Reply via email to