File tree Expand file tree Collapse file tree 2 files changed +14
-17
lines changed Expand file tree Collapse file tree 2 files changed +14
-17
lines changed Original file line number Diff line number Diff line change @@ -92,6 +92,19 @@ Default: ``CONCURRENCY_LIST_EDITABLE_POLICY_SILENT``
92
92
93
93
.. _list_editable_policies :
94
94
95
+ .. setting :: CONCURRENCY_IGNORE_DEFAULT
96
+
97
+ IGNORE_DEFAULT
98
+ --------------
99
+ .. versionadded :: >1.2
100
+
101
+ Default: ``True ``
102
+
103
+ Determines whether a default version number is ignored or used in a concurrency check. While this
104
+ configuration defaults to True for backwards compatibility, this setting can cause omitted version
105
+ numbers to pass concurrency checks. New implementations are recommended to set this to ``False ``.
106
+
107
+
95
108
``CONCURRENCY_LIST_EDITABLE_POLICY_SILENT ``
96
109
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
97
110
Used by admin's integrations to handle ``list_editable `` conflicts.
Original file line number Diff line number Diff line change @@ -32,22 +32,6 @@ def test_loaddata_fail():
32
32
data = json .load (open (datafile , 'r' ))
33
33
pk = data [0 ]['pk' ]
34
34
35
- with pytest .raises (RecordModifiedError ):
36
- call_command ('loaddata' , datafile , stdout = StringIO ())
37
-
38
- assert not SimpleConcurrentModel .objects .filter (id = pk ).exists ()
39
-
40
-
41
- @pytest .mark .django_db (transaction = False )
42
- def test_loaddata ():
43
- datafile = os .path .join (os .path .dirname (__file__ ), 'dumpdata.json' )
44
- data = json .load (open (datafile , 'r' ))
45
- pk = data [0 ]['pk' ]
46
-
47
- # with pytest.raises(RecordModifiedError):
48
- # call_command('loaddata', datafile, stdout=StringIO())
49
-
50
- with disable_concurrency ():
51
- call_command ('loaddata' , datafile , stdout = StringIO ())
35
+ call_command ('loaddata' , datafile , stdout = StringIO ())
52
36
53
37
assert SimpleConcurrentModel .objects .get (id = pk ).username == 'loaded'
You can’t perform that action at this time.
0 commit comments