Commit 912ccc07 authored by Klaus Wölfel's avatar Klaus Wölfel Committed by Klaus Wölfel

[erp5_officejs] Fix error when converting new document with remote storage

In only office apps and notebook app download convert gadget produces error
when trying to convert a new document when using erp5 storage because it
redirects to the document with old jio_key which does not exist anymore
after syncing. The bug is fixed by introducing a cloudooo_only parameter
in ojs_sync gadget which is used to only sync cloudooo storage.
parent 2fb8c35a
......@@ -26,7 +26,9 @@
}
})
.push(function () {
return gadget.repair();
if (!gadget.state.cloudooo_only) {
return gadget.repair();
}
})
.push(function () {
if (gadget.state.redirect) {
......@@ -47,7 +49,8 @@
return gadget.changeState({
auto_repair: options.auto_repair,
redirect: options.redirect,
cloudooo: result && true
cloudooo: result && true,
cloudooo_only: options.cloudooo_only
});
});
})
......
......@@ -242,7 +242,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>969.42224.7621.358</string> </value>
<value> <string>978.61273.2319.54766</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>1534757989.87</float>
<float>1570356085.27</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -25,7 +25,7 @@
// declared methods
/////////////////////////////////////////////////////////////////
.declareMethod("getConvertedBlob", function (options) {
var gadget = this;
var gadget = this, redirect;
return gadget.getSetting('file_extension')
.push(function (file_extension) {
if (file_extension === options.format) {
......@@ -49,6 +49,7 @@
'options': {
'page': 'ojs_sync',
'auto_repair': true,
'cloudooo_only': true,
'redirect': options.redirect
}
});
......@@ -67,6 +68,7 @@
'options': {
'page': 'ojs_sync',
'auto_repair': true,
'cloudooo_only': true,
'redirect': options.redirect
}
});
......
......@@ -269,7 +269,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>969.46486.51629.28689</string> </value>
<value> <string>978.61280.24884.63385</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -287,7 +287,7 @@
</tuple>
<state>
<tuple>
<float>1534770737.04</float>
<float>1570356626.41</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