From 32c60cf5c554a1ff3819cc658ebf5846ccb9d6be Mon Sep 17 00:00:00 2001 From: John Christopher Anderson Date: Tue, 13 Jul 2010 14:25:06 +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/trunk@963725 13f79535-47bb-0310-9956-ffa450edef68 --- src/couchdb/couch_doc.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/couchdb') 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