Use simplified parser for get_eval_fields

Instead of using the PYSONEncoder we can just iterate over the basic JSON types
and use the pyson method to retrieve nested PYSON instances.

issue11164
review376551002
This commit is contained in:
Cédric Krier committed 2022-01-30 13:10:57 +01:00
1 parent 42bb53f11b
commit 6be0df6001
1 file changed
+12 -1
+12 -1
View File
@@ -168,7 +168,18 @@
},
__string_params__: function() {
return [this._value, this._default];
}
},
get basename() {
var name = this._value;
if (name.startsWith('_parent_')) {
name = name.slice('_parent_'.length);
}
var idx = name.indexOf('.');
if (idx >= 0) {
name = name.substring(0, idx);
}
return name;
},
});
Sao.PYSON.Eval.eval_ = function(value, context) {