Fixed querying ReferenceField custom_id (#317)
This commit is contained in:
parent
1ddf8b3159
commit
ebdd2d730c
2 changed files with 1 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -853,8 +853,6 @@ class ReferenceField(BaseField):
|
|||
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]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue