Skip to content

Commit

Permalink
Fix critical bug on batch read of deleted docs
Browse files Browse the repository at this point in the history
  • Loading branch information
VictorNicollet committed Nov 5, 2012
1 parent ecc5306 commit 3a96dd7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/couchDB_cache.ml
Expand Up @@ -147,7 +147,9 @@ let fetch database =
let docs = BatList.filter_map begin fun json ->
try
Json.to_object (fun ~opt ~req ->
Some (Id.of_json (req "id"), req "doc")) json
match req "doc" with
| (Json.Object _) as doc -> Some (Id.of_json (req "id"), doc)
| _ -> None) json
with _ -> None
end list in
let values = List.map
Expand Down

0 comments on commit 3a96dd7

Please sign in to comment.