Browse files

Fixes to mc_couch_kv:addRev/3

The revision was not being properly extracted from the #doc_info record.
  • Loading branch information...
1 parent 6f0170b commit cea24e6dae53e93b10b3993b68f448f2ca37432b @fdmanana fdmanana committed Jun 9, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/mc_couch_kv.erl
View
4 src/mc_couch_kv.erl
@@ -21,8 +21,8 @@ cleanup(EJson) ->
addRev(Db, Key, Doc) ->
case couch_db:get_doc_info(Db, Key) of
- {ok, #doc_info{revs=[#rev_info{rev=Rev,seq=Seq}]}} ->
- Doc#doc{revs={Seq,[Rev]}};
+ {ok, #doc_info{revs=[#rev_info{rev={Pos,RevId}} | _]}} ->
+ Doc#doc{revs={Pos,[RevId]}};
_ ->
Doc
end.

0 comments on commit cea24e6

Please sign in to comment.