diff --git a/src/model/mongo.js b/src/model/mongo.js index 2e2ce4b8..b923f9c1 100644 --- a/src/model/mongo.js +++ b/src/model/mongo.js @@ -176,6 +176,7 @@ export default class extends Base { this.where({[pk]: data[pk]}); delete data[pk]; } + data = await this.beforeUpdate(data, options); let result = await this.db().update(data, options); await this.afterUpdate(data, options); return result.result.nModified || 0; @@ -348,4 +349,4 @@ export default class extends Base { return collection.indexes(); }); } -} \ No newline at end of file +}