Commit 035a7ba0 authored by Romain Courteaud's avatar Romain Courteaud Committed by Łukasz Nowak

erp5_web_monitoring: Avoid redirection in render

It's a workaround for issue in monitor resulting with infinite recursion after
clicking delete button.
parent 1b6dcf48
......@@ -12,7 +12,9 @@
.declareAcquiredMethod("jio_remove", "jio_remove")
.declareAcquiredMethod("notifySubmitting", "notifySubmitting")
.declareAcquiredMethod("notifySubmitted", 'notifySubmitted')
.declareJob("redirectByJob", function (options) {
return this.redirect(options);
})
.declareMethod("render", function (options) {
var gadget = this;
......@@ -24,7 +26,7 @@
return gadget.notifySubmitted({message: "Document Deleted", status: "success"});
})
.push(function () {
return gadget.redirect({command: 'change', options: {
return gadget.redirectByJob({command: 'change', options: {
page: options.return_url || 'settings_configurator'
}});
});
......
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