From 4a21ba2210ee5b1e650f6b0faa75c9d635c6cdbc Mon Sep 17 00:00:00 2001 From: Georgios Verigakis Date: Sat, 28 Mar 2026 15:24:05 +0200 Subject: [6.0.x] Refs #36526 -- Fixed bulk_update() batching example in docs. Backport of 4fd9e85b6031e7ddf878b280f324da6b98f7b0ed from main. --- AUTHORS | 1 + docs/ref/models/querysets.txt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index 932acb47d5..4929039f49 100644 --- a/AUTHORS +++ b/AUTHORS @@ -397,6 +397,7 @@ answer newbie questions, and generally made Django that much better: George Y. Kussumoto Georg "Hugo" Bauer Georgi Stanojevski + Georgios Verigakis Gerardo Orozco Giannis Terzopoulos Gil Gonçalves diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt index 9a1d30c299..2b4283c6c8 100644 --- a/docs/ref/models/querysets.txt +++ b/docs/ref/models/querysets.txt @@ -2519,7 +2519,7 @@ them, but it has a few caveats: from itertools import islice batch_size = 100 - ids_iter = range(1000) + ids_iter = iter(range(1000)) while ids := list(islice(ids_iter, batch_size)): batch = Entry.objects.filter(ids__in=ids) for entry in batch: -- cgit v1.3