[Composition] Return newly-contextualized object
After adding to composition, return the newly-contextualized object; this is regularly used by other services.
This commit is contained in:
@@ -97,17 +97,7 @@ define(
|
||||
}
|
||||
|
||||
return parentPersistence.persist().then(function () {
|
||||
// Locate and return new Object in context of parent.
|
||||
return parent
|
||||
.useCapability('composition')
|
||||
.then(function (children) {
|
||||
var i;
|
||||
for (i = 0; i < children.length; i += 1) {
|
||||
if (children[i].getId() === id) {
|
||||
return children[i];
|
||||
}
|
||||
}
|
||||
});
|
||||
return result;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user