couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject [35/50] [abbrv] couchdb commit: updated refs/heads/1.6.x to d2ac597
Date Tue, 01 Apr 2014 17:42:17 GMT
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/1.6.x
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