diff --git a/loopback/common/models/loggable.js b/loopback/common/models/loggable.js index ec6989717..7aecfe976 100644 --- a/loopback/common/models/loggable.js +++ b/loopback/common/models/loggable.js @@ -259,6 +259,10 @@ module.exports = function(Self) { removeUnloggable(definition, oldInstance); removeUnloggable(definition, newInstance); + // Prevent log with no new changes + const hasNewChanges = Object.keys(newInstance) != 0; + if (!hasNewChanges) return; + let logRecord = { originFk: originId, userFk: userFk,