Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Revert change to handle .distinct() for referenced documents.

This is causing an issue where mongoengine is trying to dereference
  • Loading branch information...
commit 436c8b1c11aae05fa7fac5426489c1ac3a28203f 1 parent 2a34358
@neevor authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 mongoengine/
5 mongoengine/
@@ -1103,8 +1103,9 @@ def distinct(self, field):
.. versionadded:: 0.4
.. versionchanged:: 0.5 - Fixed handling references
- from dereference import DeReference
- return DeReference()(self._cursor.distinct(field), 1)
+ return self._cursor.distinct(field)
+ #from dereference import DeReference
+ #return DeReference()(self._cursor.distinct(field), 1)
def only(self, *fields):
"""Load only a subset of this document's fields. ::
Please sign in to comment.
Something went wrong with that request. Please try again.