From 9142ccbb87dc8de4f6dbc44b1fd9e96995b65537 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 26 Oct 2022 23:30:54 +0200 Subject: [PATCH] Fill size limit with group length when undefined The size_limit can be evaluated as undefined because the attribute is set when it is None on the server side. issue11782 review424131003 (grafted from fed9fc5cfdfb69e30ab166b4a121c9a201e761fb) --HG-- branch : 6.0 --- src/view/form.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/view/form.js b/src/view/form.js index c07b6913b0..509efafc92 100644 --- a/src/view/form.js +++ b/src/view/form.js @@ -3242,7 +3242,7 @@ function eval_pyson(value){ size_limit = record.expr_eval(this.attributes.size); } if (this._readonly) { - if (size_limit === null) { + if ((size_limit === null) || (size_limit === undefined)) { size_limit = this.screen.group.length; } else { size_limit = Math.min(