summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHasan Ramezani <hasan.r67@gmail.com>2020-11-12 10:06:04 +0100
committerCarlton Gibson <carlton.gibson@noumenal.es>2020-11-12 10:07:11 +0100
commiteba8d6f5d73ed315e4b89b6cb92db57c3906bd5d (patch)
tree47217b337cd1a08488f2f12c7291eedd650f27cb
parent7ace6265d68febc2914aafe39cd671c13da43715 (diff)
[3.1.x] Fixed #32187 -- Removed unnecessary select_related in queries doc.
Backport of c448e614c60cc97c6194c62052363f4f501e0953 from master
-rw-r--r--docs/topics/db/queries.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/topics/db/queries.txt b/docs/topics/db/queries.txt
index 5e0ea8fa3e..d39e119109 100644
--- a/docs/topics/db/queries.txt
+++ b/docs/topics/db/queries.txt
@@ -1283,7 +1283,7 @@ table. Example::
>>> b = Blog.objects.get(pk=1)
# Update all the headlines belonging to this Blog.
- >>> Entry.objects.select_related().filter(blog=b).update(headline='Everything is the same')
+ >>> Entry.objects.filter(blog=b).update(headline='Everything is the same')
Be aware that the ``update()`` method is converted directly to an SQL
statement. It is a bulk operation for direct updates. It doesn't run any