(self, model, pks)
| 203 | return to_cache |
| 204 | |
| 205 | def _load_model_objects(self, model, pks): |
| 206 | try: |
| 207 | ui = connections[self.query._using].get_unified_index() |
| 208 | index = ui.get_index(model) |
| 209 | objects = index.read_queryset(using=self.query._using) |
| 210 | return objects.in_bulk(pks) |
| 211 | except NotHandled: |
| 212 | self.log.warning("Model '%s' not handled by the routers.", model) |
| 213 | # Revert to old behaviour |
| 214 | return model._default_manager.in_bulk(pks) |
| 215 | |
| 216 | def _fill_cache(self, start, end, **kwargs): |
| 217 | # Tell the query where to start from and how many we'd like. |
no test coverage detected