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

Method __setstate__

mongoengine/queryset/base.py:150–163  ·  view source on GitHub ↗

Need for pickling queryset See https://github.com/MongoEngine/mongoengine/issues/442

(self, obj_dict)

Source from the content-addressed store, hash-verified

148 return obj_dict
149
150 def __setstate__(self, obj_dict):
151 """
152 Need for pickling queryset
153
154 See https://github.com/MongoEngine/mongoengine/issues/442
155 """
156
157 obj_dict["_collection_obj"] = obj_dict["_document"]._get_collection()
158
159 # update attributes
160 self.__dict__.update(obj_dict)
161
162 # forse load cursor
163 # self._cursor
164
165 def __getitem__(self, key):
166 """Return a document instance corresponding to a given index if

Callers

nothing calls this directly

Calls 2

_get_collectionMethod · 0.80
updateMethod · 0.45

Tested by

no test coverage detected