Commit f63dcfc7 authored by Roque's avatar Roque

erp5_web_monitoring: fix delete opml loop bug

parent 57049ef9
......@@ -10,23 +10,20 @@
/////////////////////////////////////////////////////////////////
.declareAcquiredMethod("redirect", "redirect")
.declareAcquiredMethod("jio_remove", "jio_remove")
.declareAcquiredMethod("notifySubmitting", "notifySubmitting")
.declareAcquiredMethod("notifySubmitted", 'notifySubmitted')
.declareMethod("render", function (options) {
var gadget = this;
return gadget.notifySubmitting()
.push(function () {
return gadget.jio_remove(options.jio_key);
})
return gadget.jio_remove(options.jio_key)
.push(function () {
return gadget.notifySubmitted({message: "Document Deleted", status: "success"});
return gadget.notifySubmitted({message: "Document Deleted", status: "success"})
}, function (error) {
return gadget.notifySubmitted({message: error.message, status: "error"})
})
.push(function () {
return gadget.redirect({command: 'change', options: {
page: options.return_url || 'settings_configurator'
}});
});
});
}, {mutex: 'render'});
}(window, rJS));
......@@ -260,7 +260,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1016.7854.16646.24046</string> </value>
<value> <string>1020.22291.41890.38485</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -280,7 +280,7 @@
</tuple>
<state>
<tuple>
<float>1713981022.38</float>
<float>1730318970.28</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -257,6 +257,13 @@
});
}
return removeOPMLTree(id);
}, function (error) {
if (error && error.status_code === 404) {
//opml already removed
return;
} else {
throw error;
}
});
};
......
......@@ -269,7 +269,7 @@
</tuple>
<state>
<tuple>
<float>1727445979.03</float>
<float>1730318820.81</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