From 2bf9181a0bc5c6ba53347dc20d465937916e90ad Mon Sep 17 00:00:00 2001 From: John Christopher Anderson Date: Tue, 13 Jul 2010 14:30:42 +0000 Subject: 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) git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.0.x@963732 13f79535-47bb-0310-9956-ffa450edef68 --- src/couchdb/couch_doc.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/couchdb/couch_doc.erl b/src/couchdb/couch_doc.erl index 50dbd9d0..acae0c55 100644 --- a/src/couchdb/couch_doc.erl +++ b/src/couchdb/couch_doc.erl @@ -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. -- cgit v1.2.3