Tiny fix: use setAttributes
This commit is contained in:
parent
c3f7a7acb5
commit
93fab448bc
|
@ -1699,9 +1699,7 @@ EmbedsMany.prototype.updateById = function (fkId, data, cb) {
|
|||
|
||||
if (inst instanceof modelTo) {
|
||||
if (typeof data === 'object') {
|
||||
for (var key in data) {
|
||||
inst[key] = data[key];
|
||||
}
|
||||
inst.setAttributes(data);
|
||||
}
|
||||
var err = inst.isValid() ? null : new ValidationError(inst);
|
||||
if (err && typeof cb === 'function') {
|
||||
|
|
Loading…
Reference in New Issue