Merge branch 'dev' into 3563-item_index_producer
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Joan Sanchez 2022-02-01 11:55:11 +00:00
commit 2428e2fc6f
1 changed files with 9 additions and 3 deletions

View File

@ -291,7 +291,8 @@ module.exports = function(Self) {
* @param {*} properties Modified object properties
*/
function removeUnloggable(definition, properties) {
const propList = Object.keys(properties);
const objectCopy = Object.assign({}, properties);
const propList = Object.keys(objectCopy);
const propDefs = new Map();
for (let property in definition.properties) {
@ -302,10 +303,15 @@ module.exports = function(Self) {
for (let property of propList) {
const propertyDef = propDefs.get(property);
const firstChar = property.substring(0, 1);
const isPrivate = firstChar == '$';
if (!propertyDef) return;
if (isPrivate || !propertyDef)
delete properties[property];
if (propertyDef.log === false)
if (!propertyDef) continue;
if (propertyDef.log === false || isPrivate)
delete properties[property];
else if (propertyDef.logValue === false)
properties[property] = null;