You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by jc...@apache.org on 2010/07/13 16:25:07 UTC

svn commit: r963725 - /couchdb/trunk/src/couchdb/couch_doc.erl

Author: jchris
Date: Tue Jul 13 14:25:06 2010
New Revision: 963725

URL: http://svn.apache.org/viewvc?rev=963725&view=rev
Log:
show the complete document body even when the document is deleted (Couch lets you store data with a delete but did not render it to JSON)

Modified:
    couchdb/trunk/src/couchdb/couch_doc.erl

Modified: couchdb/trunk/src/couchdb/couch_doc.erl
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_doc.erl?rev=963725&r1=963724&r2=963725&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_doc.erl (original)
+++ couchdb/trunk/src/couchdb/couch_doc.erl Tue Jul 13 14:25:06 2010
@@ -27,8 +27,8 @@ to_json_rev(0, []) ->
 to_json_rev(Start, [FirstRevId|_]) ->
     [{<<"_rev">>, ?l2b([integer_to_list(Start),"-",revid_to_str(FirstRevId)])}].
 
-to_json_body(true, _Body) ->
-    [{<<"_deleted">>, true}];
+to_json_body(true, {Body}) ->
+    Body ++ [{<<"_deleted">>, true}];
 to_json_body(false, {Body}) ->
     Body.