couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bigblue...@apache.org
Subject couchdb commit: updated refs/heads/master to 597b8d1
Date Wed, 26 Mar 2014 13:39:05 GMT
Repository: couchdb
Updated Branches:
  refs/heads/master 827b84891 -> 597b8d161


fixed _update function example

It was only checking for req.id existance (it should
always be included in the request) and not its truthiness.


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/597b8d16
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/597b8d16
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/597b8d16

Branch: refs/heads/master
Commit: 597b8d1611e951cbff0a8f9521bae2c0694baa5d
Parents: 827b848
Author: BigBlueHat <byoung@bigbluehat.com>
Authored: Wed Mar 26 09:38:57 2014 -0400
Committer: BigBlueHat <byoung@bigbluehat.com>
Committed: Wed Mar 26 09:38:57 2014 -0400

----------------------------------------------------------------------
 share/doc/src/couchapp/ddocs.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/597b8d16/share/doc/src/couchapp/ddocs.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/couchapp/ddocs.rst b/share/doc/src/couchapp/ddocs.rst
index 754b9b7..4f4664a 100644
--- a/share/doc/src/couchapp/ddocs.rst
+++ b/share/doc/src/couchapp/ddocs.rst
@@ -419,7 +419,7 @@ The basic example that demonstrates all use-cases of update handlers below:
 
     function(doc, req){
         if (!doc){
-            if ('id' in req){
+            if ('id' in req && req['id']){
                 // create new document
                 return [{'_id': req['id']}, 'New World']
             }


Mime
View raw message