Fall-back to internal selection value if selection is a string
When DomainParser format a domain from a DomainValidationError, the field definition may contain as selection as string. At this place we can not really make an other RPC call to convert the selection so we fall-back to the internal value. issue9989 review349271002
This commit is contained in:
1 parent
41513b2718
commit
9cb5543f9d
1 file changed
+5
-3
+5
-3
@@ -2005,9 +2005,11 @@
|
||||
return (value * factor).toFixed(digit);
|
||||
};
|
||||
var format_selection = function() {
|
||||
for (var i = 0; i < field.selection.length; i++) {
|
||||
if (field.selection[i][0] == value) {
|
||||
return field.selection[i][1];
|
||||
if (field.selection instanceof Array) {
|
||||
for (var i = 0; i < field.selection.length; i++) {
|
||||
if (field.selection[i][0] == value) {
|
||||
return field.selection[i][1];
|
||||
}
|
||||
}
|
||||
}
|
||||
return value || '';
|
||||
|
||||
Reference in new issue
Block a user