From f451e281b80dfe98213d73a58ecdcbbdfc70a05e Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Wed, 25 Nov 2015 12:06:02 -0500 Subject: [PATCH] datastore readme upsert fix --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index cc728ceb996..878071ae54a 100644 --- a/README.md +++ b/README.md @@ -154,12 +154,12 @@ dataset.save({ data: blogPostData }, function(err) { // `blogPostKey` has been updated with an ID so you can do more operations - // with it, such as an update: + // with it, such as an update. + blogPostData.isDraft = false; + dataset.save({ key: blogPostKey, - data: { - isDraft: false - } + data: blogPostData }, function(err) { if (!err) { // The blog post is now published!