Commit 38ac3669 authored by Boris Kocherov's avatar Boris Kocherov Committed by Romain Courteaud

[erp5_only_office] xmla_client.js: clear cache values properly

parent 9903d48a
...@@ -12,9 +12,8 @@ ...@@ -12,9 +12,8 @@
.push(function () { .push(function () {
return cache[key]; return cache[key];
}); });
} else {
return cache[key];
} }
return cache[key];
} }
function xmla_request(func, prop) { function xmla_request(func, prop) {
...@@ -203,6 +202,7 @@ ...@@ -203,6 +202,7 @@
return cache.levels[level_uname]; return cache.levels[level_uname];
}) })
.push(undefined, function (err) { .push(undefined, function (err) {
delete cache.levels[level_uname];
console.error(err); console.error(err);
}); });
cache.levels[level_uname] = queue; cache.levels[level_uname] = queue;
...@@ -299,6 +299,7 @@ ...@@ -299,6 +299,7 @@
return members; return members;
}) })
.push(undefined, function (err) { .push(undefined, function (err) {
delete cache.membersOnLevel[level_uname];
console.error(err); console.error(err);
}); });
cache.membersOnLevel[level_uname] = queue; cache.membersOnLevel[level_uname] = queue;
...@@ -328,12 +329,14 @@ ...@@ -328,12 +329,14 @@
}) })
.push(function (members) { .push(function (members) {
if (!members) { if (!members) {
delete cache.members[memeber_uname];
// cache.members[memeber_uname] = false; // cache.members[memeber_uname] = false;
return; return;
} }
return cache.members[memeber_uname]; return cache.members[memeber_uname];
}) })
.push(undefined, function (err) { .push(undefined, function (err) {
delete cache.members[memeber_uname];
console.error(err); console.error(err);
// throw err; // throw err;
}); });
......
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