Return a copy of the current QuerySet that's ready for another operation. If the QuerySet has opted in to in-place mutations via _disable_cloning() temporarily, the copy doesn't occur and instead the same QuerySet instance will be modified.
(self)
| 2197 | return PreventQuerySetCloning(self) |
| 2198 | |
| 2199 | def _chain(self): |
| 2200 | """ |
| 2201 | Return a copy of the current QuerySet that's ready for another |
| 2202 | operation. |
| 2203 | |
| 2204 | If the QuerySet has opted in to in-place mutations via |
| 2205 | _disable_cloning() temporarily, the copy doesn't occur and instead the |
| 2206 | same QuerySet instance will be modified. |
| 2207 | """ |
| 2208 | if not self._cloning_enabled: |
| 2209 | obj = self |
| 2210 | else: |
| 2211 | obj = self._clone() |
| 2212 | if obj._sticky_filter: |
| 2213 | obj.query.filter_is_sticky = True |
| 2214 | obj._sticky_filter = False |
| 2215 | return obj |
| 2216 | |
| 2217 | def _clone(self): |
| 2218 | """ |
no test coverage detected