MCPcopy Index your code
hub / github.com/MongoEngine/mongoengine / to_python

Method to_python

mongoengine/fields.py:807–812  ·  view source on GitHub ↗
(self, value)

Source from the content-addressed store, hash-verified

805 return super().prepare_query_value(op, self.to_mongo(value))
806
807 def to_python(self, value):
808 if isinstance(value, dict):
809 doc_cls = get_document(value["_cls"])
810 value = doc_cls._from_son(value)
811
812 return value
813
814 def validate(self, value, clean=True):
815 if self.choices and isinstance(value, SON):

Callers

nothing calls this directly

Calls 2

get_documentFunction · 0.90
_from_sonMethod · 0.80

Tested by

no test coverage detected