Permalink
Browse files

bugfix for findOpt(Col,[],...)

  • Loading branch information...
1 parent 5bec608 commit 19cd670f77be8a8260e03e0c5146b050f9c95469 @SergejJurecko committed Aug 6, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 mongoapi.erl
View
@@ -225,7 +225,7 @@ find(Query, Selector, From, Limit) ->
findOpt(Col, Query, Selector, Opts, From, Limit) when is_list(Query) ->
case Query of
[] ->
- {_,Q} = translateopts(false,undefined, Opts,[{<<"query">>, {bson,<<>>}}]);
+ {_,Q} = translateopts(false,undefined, Opts,[{<<"query">>, {bson,mongodb:encode([])}}]);
_ ->
{_,Q} = translateopts(false,undefined, Opts,[{<<"query">>, Query}])
end,

0 comments on commit 19cd670

Please sign in to comment.