Skip to content

Commit

Permalink
Fixed querying ReferenceField custom_id (MongoEngine#317)
Browse files Browse the repository at this point in the history
  • Loading branch information
rozza committed May 20, 2013
1 parent 1ddf8b3 commit ebdd2d7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 1 addition & 0 deletions docs/changelog.rst
Expand Up @@ -4,6 +4,7 @@ Changelog

Changes in 0.8.0
================
- Fixed querying ReferenceField custom_id (#317)
- Fixed pickle issues with collections (#316)
- Added `get_next_value` preview for SequenceFields (#319)
- Added no_sub_classes context manager and queryset helper (#312)
Expand Down
2 changes: 0 additions & 2 deletions mongoengine/fields.py
Expand Up @@ -853,8 +853,6 @@ def to_mongo(self, document):
if not self.dbref:
return document.id
return document
elif not self.dbref and isinstance(document, basestring):
return ObjectId(document)

id_field_name = self.document_type._meta['id_field']
id_field = self.document_type._fields[id_field_name]
Expand Down

0 comments on commit ebdd2d7

Please sign in to comment.