Merge pull request '2296 - Prevent log with no new changes' (#293) from 2297-loggable_empty_logs into dev
gitea/salix/pipeline/head This commit looks good Details

Reviewed-by: Carlos Jimenez <carlosjr@verdnatura.es>
This commit is contained in:
Joan Sanchez 2020-06-05 11:32:54 +00:00
commit 3a24732d78
1 changed files with 4 additions and 0 deletions

View File

@ -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).length;
if (!hasNewChanges) return;
let logRecord = {
originFk: originId,
userFk: userFk,