diff --git a/CHANGES_NEXT_RELEASE b/CHANGES_NEXT_RELEASE index a1191de3..2fe7453c 100644 --- a/CHANGES_NEXT_RELEASE +++ b/CHANGES_NEXT_RELEASE @@ -1 +1,2 @@ +- Fix: do not try cast entity id and entity type in update rules when expand parameters of rule to avoid BadRequest en CB tries to update that entities (#791) - Fix: do not invoke calback twice when error about trust not found in trustConf (#790) diff --git a/lib/models/updateAction.js b/lib/models/updateAction.js index a40e23d0..1c916c25 100644 --- a/lib/models/updateAction.js +++ b/lib/models/updateAction.js @@ -169,8 +169,9 @@ function processOptionParams(action, event) { changes[key].metadata = theMeta; } }); - changes.id = myutils.expandVar(action.parameters.id, event, true); - changes.type = myutils.expandVar(action.parameters.type, event, true); + // Do not expandVar with trycast, since entity id and type should be always string values types + changes.id = myutils.expandVar(action.parameters.id, event, false); + changes.type = myutils.expandVar(action.parameters.type, event, false); logger.debug('processOptionParams changes: %j', changes); return changes; }