Fixed error with not properly referenced

This commit is contained in:
Henry 2015-12-02 19:18:50 -08:00
parent cee0ecf0ef
commit 3b427c31a2

View File

@ -104,14 +104,10 @@ define(
function addClonesToParent(self) { function addClonesToParent(self) {
var parentClone = self.clones[self.clones.length-1]; var parentClone = self.clones[self.clones.length-1];
//self.persistenceService
// .updateObject(self.persistenceSpace,
// parentClone.id, parentClone.model)
return parentClone.getCapability("persistence").persist() return parentClone.getCapability("persistence").persist()
.then(function(){self.parent.getCapability("composition").add(parentClone.getId())}) .then(function(){self.parent.getCapability("composition").add(parentClone.getId())})
.then(function(){return self.parent.getCapability("persistence").persist();}) .then(function(){return self.parent.getCapability("persistence").persist();})
.then(function(){return parentClone;}); .then(function(){return parentClone;});
// Ensure the clone of the original domainObject is returned
} }
/** /**
@ -175,7 +171,7 @@ define(
}); });
} else { } else {
//Creating a link, no need to iterate children //Creating a link, no need to iterate children
return $q.when(originalObject); return self.$q.when(originalObject);
} }