diff options
author | Damien F. Katz <damien@apache.org> | 2008-07-15 23:25:12 +0000 |
---|---|---|
committer | Damien F. Katz <damien@apache.org> | 2008-07-15 23:25:12 +0000 |
commit | 42258ff550ccc17da58f80dc03313a7268dffaa2 (patch) | |
tree | 8e0c5cd7b38b85cfacd965521772cdd59503d2c5 /src | |
parent | ae2d68d08a9c97c71e82da9aae808fb49e699695 (diff) |
fix for attachment editing when their are conflicts
git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@677087 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r-- | src/couchdb/couch_httpd.erl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/couchdb/couch_httpd.erl b/src/couchdb/couch_httpd.erl index 27d2d902..af8d9b46 100644 --- a/src/couchdb/couch_httpd.erl +++ b/src/couchdb/couch_httpd.erl @@ -653,9 +653,9 @@ handle_attachment_request(Req, Method, _DbName, Db, DocId, FileName) missing_rev -> % make the new doc #doc{id=DocId}; _ -> - case couch_db:open_doc(Db, DocId, []) of - {ok, Doc0} -> Doc0#doc{revs=[Rev]}; - Error -> throw(Error) + case couch_db:open_doc_revs(Db, DocId, [Rev], []) of + {ok, [{ok, Doc0}]} -> Doc0#doc{revs=[Rev]}; + {ok, [Error]} -> throw(Error) end end, |