0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-11 02:12:21 -05:00

Correct event debug logs in base model

no issue
This commit is contained in:
kirrg001 2019-02-01 19:48:27 +01:00
parent 3274138ff3
commit d44d93a19d

View file

@ -115,10 +115,8 @@ ghostBookshelf.Model = ghostBookshelf.Model.extend({
* If the query runs in a txn, `_previousAttributes` will be empty.
*/
emitChange: function (model, event, options) {
debug(model.tableName, event);
if (!options.transacting) {
debug(`event: ${event}`);
debug(`event trigger without txn: ${event}`);
return common.events.emit(event, model, options);
}
@ -138,7 +136,7 @@ ghostBookshelf.Model = ghostBookshelf.Model.extend({
}
_.each(this.ghostEvents, (ghostEvent) => {
debug(`event: ${event}`);
debug(`event: ${ghostEvent}`);
common.events.emit(ghostEvent, model, _.omit(options, 'transacting'));
});