INNER CODE UNIT · Python
deserialize_from_mongo
Scille/umongo · src/umongo/abstract.py:169
def deserialize_from_mongo(self, value):
if value is None and getattr(self, "allow_none", False) is True:
return None
return self._deserialize_from_mongo(value)
def _serialize_to_mongo(self, obj):
return obj
def _deserialize_from_mongo(self, value):
return value
def _extract_marshmallow_field_params(self):
params = {
attribute: getattr(self, attribute)
for attribute in (
"validate",
"required",
"allow_none",