You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/02/07 14:10:39 UTC
[GitHub] rabbah closed pull request #114: Write a doc with overwrite=true even it doesn't exist
rabbah closed pull request #114: Write a doc with overwrite=true even it doesn't exist
URL: https://github.com/apache/incubator-openwhisk-package-cloudant/pull/114
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/actions/database-actions/write-document.js b/actions/database-actions/write-document.js
index b96b6af..c887336 100755
--- a/actions/database-actions/write-document.js
+++ b/actions/database-actions/write-document.js
@@ -62,8 +62,8 @@ function insertOrUpdate(cloudantDb, overwrite, doc) {
reject(err);
});
} else {
- console.error('error', error);
- reject(error);
+ // If not found, it means it's the first time to write, then insert a new one.
+ return insert(cloudantDb, doc);
}
});
});
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services