refs #5563 Code fix
This commit is contained in:
parent
3fbf48b845
commit
d2f821fcbd
|
@ -490,7 +490,7 @@ module.exports = class MyLogger {
|
||||||
}
|
}
|
||||||
|
|
||||||
const modelId = row[tableInfo.idName];
|
const modelId = row[tableInfo.idName];
|
||||||
const modelValue = change.modelValue;
|
const modelValue = change.modelValue ?? null;
|
||||||
const oldInstance = oldI ? JSON.stringify(oldI) : null;
|
const oldInstance = oldI ? JSON.stringify(oldI) : null;
|
||||||
const originFk = isSecondary ? row[relation] : modelId;
|
const originFk = isSecondary ? row[relation] : modelId;
|
||||||
const originChanged = isUpdate && isSecondary
|
const originChanged = isUpdate && isSecondary
|
||||||
|
@ -522,7 +522,7 @@ module.exports = class MyLogger {
|
||||||
if (originFk == null) return;
|
if (originFk == null) return;
|
||||||
await logInfo.addStmt.execute([
|
await logInfo.addStmt.execute([
|
||||||
originFk,
|
originFk,
|
||||||
row[tableInfo.userField] || null,
|
row[tableInfo.userField] ?? null,
|
||||||
action,
|
action,
|
||||||
created,
|
created,
|
||||||
modelName,
|
modelName,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "mylogger",
|
"name": "mylogger",
|
||||||
"version": "0.1.23",
|
"version": "0.1.24",
|
||||||
"author": "Verdnatura Levante SL",
|
"author": "Verdnatura Levante SL",
|
||||||
"description": "MySQL and MariaDB logger using binary log",
|
"description": "MySQL and MariaDB logger using binary log",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
|
|
Loading…
Reference in New Issue