diff options
author | John Christopher Anderson <jchris@apache.org> | 2008-11-14 03:47:21 +0000 |
---|---|---|
committer | John Christopher Anderson <jchris@apache.org> | 2008-11-14 03:47:21 +0000 |
commit | d32d8acff4bac6f51b87ddef7091c04ff7245d40 (patch) | |
tree | ab7cb32ee8e54c971d8eb28dc6881fad18aae678 /src | |
parent | 41e60ecc969649e9c1deee5d293f2451e8238ac6 (diff) |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/couchdb/couch_httpd_view.erl | 11 |
1 files changed, 6 insertions, 5 deletions
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; _ -> |