Skip to content

Commit

Permalink
Added debug log to Base model: emitChange
Browse files Browse the repository at this point in the history
no issue

- helpful for debugging model events
- DEBUG=ghost:models:base node index.js
  • Loading branch information
kirrg001 committed Jun 26, 2018
1 parent 3a95d0a commit 61db6de
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/server/models/base/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,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);

const previousAttributes = model._previousAttributes;

if (!options.transacting) {
Expand Down

0 comments on commit 61db6de

Please sign in to comment.