From 61db6defde3b10a4022c86efac29cf15ae60983f Mon Sep 17 00:00:00 2001 From: kirrg001 Date: Tue, 26 Jun 2018 15:26:49 +0200 Subject: [PATCH] Added debug log to Base model: `emitChange` no issue - helpful for debugging model events - DEBUG=ghost:models:base node index.js --- core/server/models/base/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/server/models/base/index.js b/core/server/models/base/index.js index 12569da375..e0b7f8975a 100644 --- a/core/server/models/base/index.js +++ b/core/server/models/base/index.js @@ -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) {