Skip to content

Commit 5165643

Browse files
committed
fixes #24
1 parent 775b85a commit 5165643

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/mongo/grid_fs/bucket.ex

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,13 @@ defmodule Mongo.GridFs.Bucket do
172172
end
173173

174174
# returns true if the collection contains a index with the given name
175-
defp index_member?(topology_pid, coll, index, opts) do
175+
def index_member?(topology_pid, coll, index, opts) do
176176
topology_pid
177177
|> Mongo.list_indexes(coll, opts)
178+
|> Enum.map(fn
179+
%{"name" => name} -> name
180+
_ -> ""
181+
end)
178182
|> Enum.member?(index)
179183
end
180184

0 commit comments

Comments
 (0)