2296 - Prevent log with no new changes
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Joan Sanchez 2020-06-04 14:44:38 +02:00
parent bfeef77040
commit 13859375bd
1 changed files with 4 additions and 0 deletions

View File

@ -259,6 +259,10 @@ module.exports = function(Self) {
removeUnloggable(definition, oldInstance); removeUnloggable(definition, oldInstance);
removeUnloggable(definition, newInstance); removeUnloggable(definition, newInstance);
// Prevent log with no new changes
const hasNewChanges = Object.keys(newInstance) != 0;
if (!hasNewChanges) return;
let logRecord = { let logRecord = {
originFk: originId, originFk: originId,
userFk: userFk, userFk: userFk,