Bug in VersionedDocument remove() method

5 views
Skip to first unread message

isop...@gmail.com

unread,
Jun 16, 2011, 1:56:48 AM6/16/11
to MongoKit
The VersionedDocument remove() method has a bug which results in the
query parameter being ignored, and the entire collection being
removed. The key part of the method is:

def remove(self, query, *args, **kwargs):
...
self.collection.remove(spec_or_object_id=query, *args,
**kwargs)

However, the pymongo signature for Collection.remove is:

remove(self, spec_or_id=None, safe=False, **kwargs)

Note - spec_or_id not spec_or_object_id

Nicolas Clairon

unread,
Jun 16, 2011, 3:31:38 AM6/16/11
to mong...@googlegroups.com
thanks !

I created the ticket here : https://github.com/namlook/mongokit/issues/55

N.

Reply all
Reply to author
Forward
0 new messages