不要怂,就是干,撸起袖子干!

Commit 15fbe60d by smihica

Removed needless changes.

1 parent dcfeccc2
Showing with 2 additions and 2 deletions
......@@ -482,7 +482,7 @@ Instance.prototype.save = function(options) {
if (arguments.length > 1) {
throw new Error('The second argument was removed in favor of the options object.');
}
options = _.defaults({}, options || {}, {
options = _.defaults(options || {}, {
hooks: true,
validate: true
});
......@@ -828,7 +828,7 @@ Instance.prototype.destroy = function(options) {
for(var i = 0; i < primaryKeys.length; i++) {
where[this.Model.rawAttributes[primaryKeys[i]].field] = this.get(primaryKeys[i], { raw: true });
}
return this.sequelize.getQueryInterface().delete(this, this.Model.getTableName(options), where, _.defaults({}, options, { type: QueryTypes.DELETE,limit: null}));
return this.sequelize.getQueryInterface().delete(this, this.Model.getTableName(options), where, _.defaults(options, { type: QueryTypes.DELETE,limit: null}));
}
}).tap(function() {
// Run after hook
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!