Merge pull request #1393 from strongloop/fix/updateAttributes-cb

Fix updateAttributes cb
This commit is contained in:
Sakib Hasan 2017-05-30 21:28:00 -04:00 committed by GitHub
commit 3a10c77cbd
1 changed files with 4 additions and 1 deletions

View File

@ -3250,8 +3250,11 @@ function(data, options, cb) {
var typedData = convertSubsetOfPropertiesByType(inst, data);
context.data = typedData;
function updateAttributesCallback(err) {
function updateAttributesCallback(err, data) {
if (err) return cb(err);
if (typeof connector.generateContextData === 'function') {
context = connector.generateContextData(context, data);
}
var ctx = {
Model: Model,
data: context.data,