Fixed queryset.get() respecting no_dereference (#373)
This commit is contained in:
parent
f1a1aa54d8
commit
e116bb9227
@ -4,6 +4,7 @@ Changelog
|
||||
|
||||
Changes in 0.8.3
|
||||
================
|
||||
- Fixed queryset.get() respecting no_dereference (#373)
|
||||
- Added full_result kwarg to update (#380)
|
||||
|
||||
Changes in 0.8.2
|
||||
|
@ -1165,8 +1165,8 @@ class QuerySet(object):
|
||||
raw_doc = self._cursor.next()
|
||||
if self._as_pymongo:
|
||||
return self._get_as_pymongo(raw_doc)
|
||||
|
||||
doc = self._document._from_son(raw_doc)
|
||||
doc = self._document._from_son(raw_doc,
|
||||
_auto_dereference=self._auto_dereference)
|
||||
if self._scalar:
|
||||
return self._get_scalar(doc)
|
||||
|
||||
|
@ -3258,6 +3258,8 @@ class QuerySetTest(unittest.TestCase):
|
||||
self.assertTrue(isinstance(qs.first().organization, Organization))
|
||||
self.assertFalse(isinstance(qs.no_dereference().first().organization,
|
||||
Organization))
|
||||
self.assertFalse(isinstance(qs.no_dereference().get().organization,
|
||||
Organization))
|
||||
self.assertTrue(isinstance(qs.first().organization, Organization))
|
||||
|
||||
def test_cached_queryset(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user