From d32d8acff4bac6f51b87ddef7091c04ff7245d40 Mon Sep 17 00:00:00 2001 From: John Christopher Anderson Date: Fri, 14 Nov 2008 03:47:21 +0000 Subject: fix for _all_docs_by_seq with include_docs git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@713914 13f79535-47bb-0310-9956-ffa450edef68 --- src/couchdb/couch_httpd_view.erl | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/couchdb/couch_httpd_view.erl b/src/couchdb/couch_httpd_view.erl index c3ac07e3..5b19af5d 100644 --- a/src/couchdb/couch_httpd_view.erl +++ b/src/couchdb/couch_httpd_view.erl @@ -426,12 +426,13 @@ view_row_obj(Db, {{Key, DocId}, Value}, IncludeDocs) -> [] end, ?LOG_DEBUG("Include Doc: ~p ~p", [DocId, Rev]), - case (catch couch_httpd_db:couch_doc_open(Db, DocId, - Rev, [])) of - {{not_found, missing}, _} -> + case (catch couch_httpd_db:couch_doc_open(Db, DocId, Rev, [])) of + {{not_found, missing}, _} -> {[{id, DocId}, {key, Key}, {value, Value}, {error, missing}]}; - Doc -> - JsonDoc = couch_doc:to_json_obj(Doc, []), + {not_found, deleted} -> + {[{id, DocId}, {key, Key}, {value, Value}]}; + Doc -> + JsonDoc = couch_doc:to_json_obj(Doc, []), {[{id, DocId}, {key, Key}, {value, Value}, {doc, JsonDoc}]} end; _ -> -- cgit v1.2.3