Skip to content

Commit

Permalink
Merge pull request #266 from chughts/vifix
Browse files Browse the repository at this point in the history
Fix to Visual Recognition Node
  • Loading branch information
chughts committed Mar 14, 2017
2 parents 19193ad + d3ddf44 commit 0f48556
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ Node-RED Watson Nodes for IBM Bluemix

<a href="https://cla-assistant.io/watson-developer-cloud/node-red-node-watson"><img src="https://cla-assistant.io/readme/badge/watson-developer-cloud/node-red-node-watson" alt="CLA assistant" /></a>

### New in version 0.5.2
- Visual Recognition was overwriting msg.payload with 'look at msg.results'. Fixed
so that msg.payload is left as is.


### New in version 0.5.1
- Implement methods to manage for Intent and Example Input for Intent, in
Conversation workspace Manager node.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "node-red-node-watson",
"version": "0.5.1",
"version": "0.5.2",
"description": "A collection of Node-RED nodes for IBM Watson services",
"dependencies": {
"alchemy-api": "^1.3.0",
Expand Down
4 changes: 0 additions & 4 deletions services/visual_recognition/v3.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,13 @@ module.exports = function (RED) {
msg.result = {};
msg.result['error_id'] = body.images[0].error.error_id;
msg.result['error'] = body.images[0].error.description;
msg.payload = 'see msg.result.error';
node.send(msg);
} else {
if (feature === 'deleteClassifier') {
msg.result = 'Successfully deleted classifier_id: ' + msg.params.classifier_id ;
} else {
msg.result = body;
}
msg.payload = 'see msg.result'; // to remove any Buffer that could remains
node.send(msg);
node.status({});
}
Expand Down Expand Up @@ -257,10 +255,8 @@ module.exports = function (RED) {
});
async.parallel(asyncTasks, function(error, deletedList){
if (deletedList.length === nbTodelete) {
msg.payload = 'see msg.result.error';
msg.result = 'All custom classifiers have been deleted.';
} else {
msg.payload = 'see msg.result.error';
msg.result = 'Some Classifiers could have not been deleted;' +
'See log for errors.';
}
Expand Down

0 comments on commit 0f48556

Please sign in to comment.