From e08fa42fa6d0e9f2a74e8fcdc5a47f5c3b825877 Mon Sep 17 00:00:00 2001 From: blingblin-g Date: Thu, 31 Jul 2025 00:03:27 +0900 Subject: Fixed #36426 -- Added support for further iterables in prefetch_related_objects(). Thanks Sarah Boyce for the review. --- docs/ref/models/querysets.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt index baeb3e8746..59550e6690 100644 --- a/docs/ref/models/querysets.txt +++ b/docs/ref/models/querysets.txt @@ -4223,8 +4223,9 @@ Prefetches the given lookups on an iterable of model instances. This is useful in code that receives a list of model instances as opposed to a ``QuerySet``; for example, when fetching models from a cache or instantiating them manually. -Pass an iterable of model instances (must all be of the same class) and the -lookups or :class:`Prefetch` objects you want to prefetch for. For example: +Pass an iterable of model instances (must all be of the same class and able to +be iterated multiple times) and the lookups or :class:`Prefetch` objects you +want to prefetch for. For example: .. code-block:: pycon -- cgit v1.3