diff --git a/resty-mongol-0.8-3.rockspec b/resty-mongol-0.8-4.rockspec similarity index 98% rename from resty-mongol-0.8-3.rockspec rename to resty-mongol-0.8-4.rockspec index a661186..4f7a09c 100644 --- a/resty-mongol-0.8-3.rockspec +++ b/resty-mongol-0.8-4.rockspec @@ -1,5 +1,5 @@ package = "resty-mongol" -version = "0.8-3" +version = "0.8-4" source = { url = "https://github.com/Olivine-Labs/resty-mongol/archive/v0.8.tar.gz", dir = "resty-mongol-0.8" diff --git a/src/colmt.lua b/src/colmt.lua index a8c061e..823c1e9 100755 --- a/src/colmt.lua +++ b/src/colmt.lua @@ -306,9 +306,10 @@ function colmethods:insert(docs, continue_on_error, safe) return oldpairs(t) end end + local r, err = self.db_obj:cmd(attachpairs_start({ count = self.col, - query = query and next(query) or nil + query = query or nil }, "count")) pairs = oldpairs if not r then