ObjectIdField.to_python returns pymongo.objectid.ObjectId

This commit is contained in:
blackbrrr 2010-01-14 11:32:01 -06:00
parent 1818cf7114
commit 1cdeb8130d

View File

@ -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):