Commit dae31ee2 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_jio: Minor fixup (Number + enum) for json-in-xml

parent 233ef799
......@@ -51,7 +51,9 @@
if (json_field.type === "integer" || json_field.type === "number") {
data_format = "number";
}
if (default_value === undefined) {
default_value = ""
}
for (option_index in json_field['enum']) {
if (json_field['enum'].hasOwnProperty(option_index)) {
option_list.push(domsugar('option', {
......@@ -59,7 +61,7 @@
text: json_field['enum'][option_index],
"data-format": data_format,
selected: (
json_field['enum'][option_index].toString() === default_value
json_field['enum'][option_index].toString() === default_value.toString()
)
}));
}
......
......@@ -280,7 +280,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1000.3907.45649.58794</string> </value>
<value> <string>1000.9503.46381.7543</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -298,7 +298,7 @@
</tuple>
<state>
<tuple>
<float>1651866969.39</float>
<float>1652204027.96</float>
<string>UTC</string>
</tuple>
</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