Fixed #30326 -- Doc'd how to avoid persistence of F() assignment.

This commit is contained in:
sage 2019-04-13 09:17:33 +07:00 committed by Mariusz Felisiak
parent da0b2554ec
commit bfae195b0a
No known key found for this signature in database
GPG Key ID: 2EF56372BA48CD1B
1 changed files with 3 additions and 1 deletions

View File

@ -181,7 +181,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
~~~~~~~~~~~~~~~~~~~~~~~~