File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -39,3 +39,14 @@ you use:
39
39
from simple_history.middleware import HistoricalRecords
40
40
if hasattr(HistoricalRecords.thread, 'request'):
41
41
del HistoricalRecords.thread.request
42
+
43
+ Using F() expressions
44
+ ---------------------
45
+ ``F() `` expressions, as described here _, do not work on models that have
46
+ history. Simple history inserts a new record in the historical table for any
47
+ model being updated. However, ``F() `` expressions are only functional on updates.
48
+ Thus, when an ``F() `` expression is used on a model with a history table, the
49
+ historical model tries to insert using the ``F() `` expression, and raises a
50
+ ``ValueError ``.
51
+
52
+ .. _here : https://docs.djangoproject.com/en/2.0/ref/models/expressions/#f-expressions
You can’t perform that action at this time.
0 commit comments