Commit 3f017d74 authored by Romain Courteaud's avatar Romain Courteaud

[erp5_web_renderjs_ui] RelationField: do not crash if one document is not found in catalog

parent 2cfd9162
...@@ -185,9 +185,14 @@ ...@@ -185,9 +185,14 @@
"select_list": [catalog_index] "select_list": [catalog_index]
}) })
.push(function (result) { .push(function (result) {
if (!result.data.total_rows) {
// Uid was not found.
// Do not change the display
return;
}
return gadget.changeState({ return gadget.changeState({
value_text: result.data.rows[0] value_text: result.data.rows[0]
.value[catalog_index] .value[catalog_index]
}); });
}) })
.push(function () { .push(function () {
......
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>977.6117.6830.21572</string> </value> <value> <string>978.15497.3144.35652</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -252,7 +252,7 @@ ...@@ -252,7 +252,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1563260997.53</float> <float>1567695948.47</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment