Resolve relationships for duplicate items, rename contentObject to content in mapping function

This commit is contained in:
Mo Bitar
2017-11-04 18:05:01 -05:00
parent 9b0f802537
commit e547d344b7
13 changed files with 61 additions and 51 deletions

View File

@@ -390,7 +390,7 @@ class SyncManager {
// We want a new uuid for the new item. Note that this won't neccessarily adjust references.
itemResponse.uuid = null;
var dup = this.modelManager.createItem(itemResponse);
var dup = this.modelManager.createDuplicateItem(itemResponse, item);
if(!itemResponse.deleted && JSON.stringify(item.structureParams()) !== JSON.stringify(dup.structureParams())) {
this.modelManager.addItem(dup);
dup.conflict_of = item.uuid;