Commit 5c02c537 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_jio: Ignore error if the field cannot be found

   This is a workaround for fixup when objects has internal invalid properties, since we do not want to extend the general error display before replace the json form.
parent df92f04d
...@@ -694,9 +694,11 @@ ...@@ -694,9 +694,11 @@
field_name = field_name.split("/").slice(0, -1).join("/"); field_name = field_name.split("/").slice(0, -1).join("/");
input_field = g.element.querySelector(".slapos-parameter[name='/" + field_name + "']"); input_field = g.element.querySelector(".slapos-parameter[name='/" + field_name + "']");
} }
if (input_field !== null) {
div = input_field.parentNode; div = input_field.parentNode;
div.setAttribute("class", "slapos-parameter error-input"); div.setAttribute("class", "slapos-parameter error-input");
div.querySelector("span.error").textContent = validation.errors[error_index].error; div.querySelector("span.error").textContent = validation.errors[error_index].error;
}
} else if (error_dict.keyword === "required") { } else if (error_dict.keyword === "required") {
// Specific use case for required // Specific use case for required
field_name = "/" + error_dict.key; field_name = "/" + error_dict.key;
......
...@@ -280,7 +280,7 @@ ...@@ -280,7 +280,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>1004.35604.19918.32529</string> </value> <value> <string>1004.35618.45138.1348</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -298,7 +298,7 @@ ...@@ -298,7 +298,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1669324961.21</float> <float>1671043096.21</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