Commit f63dcfc7 authored by Roque's avatar Roque

erp5_web_monitoring: fix delete opml loop bug

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