Skip to content

Commit

Permalink
set default version 2
Browse files Browse the repository at this point in the history
  • Loading branch information
AlvaroVega committed Oct 7, 2019
1 parent 203259c commit 02f750d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion documentation/plain_rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ the Perseo configuration). The `parameters` map includes the following fields:
- type: optional, the type of the entity which attribute is to be updated (by default the type of the entity that
triggers the rule is usedi.e. `${type}`)
- version: optional, The NGSI version for the update action. Set this attribute to `2` or `"2"` if you want to use
NGSv2 format. `1` by default.
NGSv2 format. `2` by default.
- isPattern: optional, `false` by default. (Only for NGSIv1. If `version` is set to 2, this attribute will be ignored)
- attributes: _mandatory_, array of target attributes to update. Each element of the array must contain the fields
- **name**: _mandatory_, attribute name to set
Expand Down
2 changes: 1 addition & 1 deletion lib/models/updateAction.js
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ function doItWithToken(action, event, version, callback) {

function doIt(action, event, callback) {
try {
if (action.parameters.version === '2' || action.parameters.version === 2) {
if (action.parameters.version === '1' && action.parameters.version === 1) {
if (action.parameters.trust) {
return doItWithToken(action, event, 2, callback);
} else {
Expand Down

0 comments on commit 02f750d

Please sign in to comment.