68346: edit-bitstream cache issues fixes

This commit is contained in:
Kristof De Langhe
2020-03-13 16:39:43 +01:00
parent 1ea9623efc
commit a72ef836f9
3 changed files with 19 additions and 26 deletions

View File

@@ -102,9 +102,8 @@ export class ServerSyncBufferEffects {
map((entry: ObjectCacheEntry) => {
if (isNotEmpty(entry.patches)) {
const flatPatch: Operation[] = [].concat(...entry.patches.map((patch) => patch.operations));
const objectPatch = flatPatch.filter((op: Operation) => op.path.startsWith('/metadata') || op.op === 'move');
if (isNotEmpty(objectPatch)) {
this.requestService.configure(new PatchRequest(this.requestService.generateRequestId(), href, objectPatch));
if (isNotEmpty(flatPatch)) {
this.requestService.configure(new PatchRequest(this.requestService.generateRequestId(), href, flatPatch));
}
}
return new ApplyPatchObjectCacheAction(href);