ObjectIdField.to_python returns pymongo.objectid.ObjectId
This commit is contained in:
parent
1818cf7114
commit
1cdeb8130d
1 changed files with 2 additions and 1 deletions
|
|
@ -69,7 +69,8 @@ class ObjectIdField(BaseField):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def to_python(self, value):
|
def to_python(self, value):
|
||||||
return unicode(value)
|
return value
|
||||||
|
# return unicode(value)
|
||||||
|
|
||||||
def to_mongo(self, value):
|
def to_mongo(self, value):
|
||||||
if not isinstance(value, pymongo.objectid.ObjectId):
|
if not isinstance(value, pymongo.objectid.ObjectId):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue