Skip to content

Commit

Permalink
[2.2.x] Fixed #30326 -- Doc'd how to avoid persistence of F() assignm…
Browse files Browse the repository at this point in the history
…ent.

Backport of bfae195 from master
  • Loading branch information
laymonage authored and felixxm committed Apr 15, 2019
1 parent 896cc71 commit 86de106
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/ref/models/expressions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down

0 comments on commit 86de106

Please sign in to comment.