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:
parent
3274138ff3
commit
d44d93a19d
1 changed files with 2 additions and 4 deletions
|
@ -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'));
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue