0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00

Added debug log to Base model: emitChange

no issue

- helpful for debugging model events
- DEBUG=ghost:models:base node index.js
This commit is contained in:
kirrg001 2018-06-26 15:26:49 +02:00
parent 3a95d0a8f1
commit 61db6defde

View file

@ -113,6 +113,8 @@ ghostBookshelf.Model = ghostBookshelf.Model.extend({
* If the query runs in a txn, `_previousAttributes` will be empty. * If the query runs in a txn, `_previousAttributes` will be empty.
*/ */
emitChange: function (model, event, options) { emitChange: function (model, event, options) {
debug(model.tableName, event);
const previousAttributes = model._previousAttributes; const previousAttributes = model._previousAttributes;
if (!options.transacting) { if (!options.transacting) {