summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorsage <laymonage@gmail.com>2019-04-13 09:17:33 +0700
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2019-04-15 09:13:56 +0200
commit86de106864508872a3f5f1f24b2ceae4c6a3770f (patch)
treeca21125900e654f8d292163ecfc4d530b54a7b9f /docs
parent896cc7190115c5bcdef756fe10dc203d9b03678c (diff)
[2.2.x] Fixed #30326 -- Doc'd how to avoid persistence of F() assignment.
Backport of bfae195b0a2c8dae755610a7e23add5c6bc37b5e from master
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/models/expressions.txt4
1 files changed, 3 insertions, 1 deletions
diff --git a/docs/ref/models/expressions.txt b/docs/ref/models/expressions.txt
index 2413952228..460a7f70d4 100644
--- a/docs/ref/models/expressions.txt
+++ b/docs/ref/models/expressions.txt
@@ -185,7 +185,9 @@ instance and will be applied on each :meth:`~Model.save()`. For example::
reporter.save()
``stories_filed`` will be updated twice in this case. If it's initially ``1``,
-the final value will be ``3``.
+the final value will be ``3``. This persistence can be avoided by reloading the
+model object after saving it, for example, by using
+:meth:`~Model.refresh_from_db()`.
Using ``F()`` in filters
~~~~~~~~~~~~~~~~~~~~~~~~