mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-17 23:44:39 -05:00
Added base model debug log for events
no issue
This commit is contained in:
parent
a45f76c574
commit
01419ef8b3
1 changed files with 2 additions and 0 deletions
|
@ -118,6 +118,7 @@ ghostBookshelf.Model = ghostBookshelf.Model.extend({
|
||||||
debug(model.tableName, event);
|
debug(model.tableName, event);
|
||||||
|
|
||||||
if (!options.transacting) {
|
if (!options.transacting) {
|
||||||
|
debug(`event: ${event}`);
|
||||||
return common.events.emit(event, model, options);
|
return common.events.emit(event, model, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -137,6 +138,7 @@ ghostBookshelf.Model = ghostBookshelf.Model.extend({
|
||||||
}
|
}
|
||||||
|
|
||||||
_.each(this.ghostEvents, (ghostEvent) => {
|
_.each(this.ghostEvents, (ghostEvent) => {
|
||||||
|
debug(`event: ${event}`);
|
||||||
common.events.emit(ghostEvent, model, _.omit(options, 'transacting'));
|
common.events.emit(ghostEvent, model, _.omit(options, 'transacting'));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue