couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject [23/49] git commit: COUCHDB-1483 - Update handlers must produce valid doc ids
Date Fri, 17 Jan 2014 22:10:08 GMT
COUCHDB-1483 - Update handlers must produce valid doc ids


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/commit/9256d130
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/tree/9256d130
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/diff/9256d130

Branch: refs/heads/import
Commit: 9256d130e98be71ed14e41110a18f764f715bca0
Parents: 2b63c12
Author: Robert Newson <rnewson@apache.org>
Authored: Sat May 26 20:36:11 2012 +0100
Committer: Robert Newson <rnewson@apache.org>
Committed: Sat May 26 20:36:11 2012 +0100

----------------------------------------------------------------------
 src/couch_mrview_show.erl | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/blob/9256d130/src/couch_mrview_show.erl
----------------------------------------------------------------------
diff --git a/src/couch_mrview_show.erl b/src/couch_mrview_show.erl
index 5a7ce5f..426b431 100644
--- a/src/couch_mrview_show.erl
+++ b/src/couch_mrview_show.erl
@@ -141,6 +141,7 @@ send_doc_update_response(Req, Db, DDoc, UpdateName, Doc, DocId) ->
                     Options = [{user_ctx, Req#httpd.user_ctx}]
             end,
             NewDoc = couch_doc:from_json_obj({NewJsonDoc}),
+            couch_doc:validate_docid(NewDoc#doc.id),
             {ok, NewRev} = couch_db:update_doc(Db, NewDoc, Options),
             NewRevStr = couch_doc:rev_to_str(NewRev),
             {[


Mime
View raw message