Commit a13605b6 authored by Gabriel Monnerat's avatar Gabriel Monnerat

erp5_forge: raise if command is empty

parent cb041ca0
......@@ -23,6 +23,9 @@
output = gadget.element.querySelector("output");
return gadget.notifySubmitting()
.push(function () {
if (!input_value.trim()) {
throw new Error("Command is empty");
}
return jIO.util.ajax({
url: gadget.state.context_url + "/" + input_value,
xhrFields: {
......
......@@ -236,7 +236,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1007.4609.6539.58316</string> </value>
<value> <string>1007.4613.18008.17937</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -256,7 +256,7 @@
</tuple>
<state>
<tuple>
<float>1678915294.84</float>
<float>1678917327.99</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