diff --git a/mylogger.js b/mylogger.js index 31023ab..c53d3dc 100644 --- a/mylogger.js +++ b/mylogger.js @@ -522,7 +522,9 @@ module.exports = class MyLogger { `[${action}]`[actionColor[action]], `${logInfo.name}: ${originFk}, ${modelName}: ${modelId}` ); + const noInclude = tableInfo.rowExcludeField && !row.editorFk; + try { if (isDelete && (!tableInfo.rowExcludeField || noInclude)) { [[deleteRow]] = await logInfo.fetchStmt.execute([ @@ -540,7 +542,7 @@ module.exports = class MyLogger { } if (!conf.testMode && (!isDelete || !deleteRow)) { async function log(originFk) { - if (originFk == null ||noInclude) return; + if (originFk == null || noInclude) return; await logInfo.addStmt.execute([ originFk, row[tableInfo.userField] ?? null,