Need for pickling queryset See https://github.com/MongoEngine/mongoengine/issues/442
(self, obj_dict)
| 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 |
nothing calls this directly
no test coverage detected