Fix updateAttributes cb

Allow pass through of the new data from the connector
Specifically for cloudant since updateAttributes changes the _rev
This commit is contained in:
ssh24 2017-05-29 15:32:32 -04:00
parent 0a056adee4
commit ba1901b2a0
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,