Merge branch 'master' of github.com:1602/jugglingdb

This commit is contained in:
Anatoliy Chakkaev 2012-12-21 12:56:45 +04:00
commit 3dc24b8f51
1 changed files with 2 additions and 0 deletions

View File

@ -721,6 +721,8 @@ AbstractClass.prototype.updateAttributes = function updateAttributes(data, cb) {
var inst = this;
var model = this.constructor.modelName;
if(!data) data = {};
// update instance's properties
Object.keys(data).forEach(function (key) {
inst[key] = data[key];