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

Method _get_items_from_list

mongoengine/dereference.py:70–81  ·  view source on GitHub ↗
(items)

Source from the content-addressed store, hash-verified

68 # Recursively dig into the sub items of a list/dict
69 # to turn the ObjectIds into DBRefs
70 def _get_items_from_list(items):
71 new_items = []
72 for v in items:
73 value = v
74 if isinstance(v, dict):
75 value = _get_items_from_dict(v)
76 elif isinstance(v, list):
77 value = _get_items_from_list(v)
78 elif not isinstance(v, (DBRef, Document)):
79 value = field.to_python(v)
80 new_items.append(value)
81 return new_items
82
83 def _get_items_from_dict(items):
84 new_items = {}

Callers

nothing calls this directly

Calls 1

to_pythonMethod · 0.45

Tested by

no test coverage detected