Added more .scalar tests

This commit is contained in:
Ross Lawley
2012-01-27 12:20:47 +00:00
parent f60a49d6f6
commit f59aa922ea
2 changed files with 260 additions and 185 deletions

View File

@@ -868,8 +868,7 @@ class QuerySet(object):
"""
if not self._query_obj.empty:
raise InvalidQueryError("Cannot use a filter whilst using `with_id`")
return self._document.objects(pk=object_id).first()
return self.filter(pk=object_id).first()
def in_bulk(self, object_ids):
"""Retrieve a set of documents by their ids.