File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 46
46
- name : Checkout Django
47
47
uses : actions/checkout@v4
48
48
with :
49
- repository : ' mongodb-forks /django'
50
- ref : ' mongodb-5.0.x '
49
+ repository : ' timgraham /django'
50
+ ref : ' mongoautofield-get-prep-value '
51
51
path : ' django_repo'
52
52
- name : Install system packages for Django's Python test dependencies
53
53
run : |
Original file line number Diff line number Diff line change @@ -61,8 +61,6 @@ class DatabaseFeatures(BaseDatabaseFeatures):
61
61
"aggregation.tests.AggregateTestCase.test_aggregation_default_passed_another_aggregate" ,
62
62
"aggregation.tests.AggregateTestCase.test_annotation_expressions" ,
63
63
"aggregation.tests.AggregateTestCase.test_reverse_fkey_annotate" ,
64
- # AutoField (IntegerField) validators crash MongoAutoField.
65
- "model_forms.tests.ModelFormBasicTests.test_recleaning_model_form_instance" ,
66
64
}
67
65
# $bitAnd, #bitOr, and $bitXor are new in MongoDB 6.3.
68
66
_django_test_expected_failures_bitwise = {
Original file line number Diff line number Diff line change 1
1
from bson import ObjectId , errors
2
2
from django .core import exceptions
3
3
from django .db .models .fields import AutoField , Field
4
+ from django .utils .functional import cached_property
4
5
from django .utils .translation import gettext_lazy as _
5
6
6
7
@@ -38,3 +39,8 @@ def to_python(self, value):
38
39
code = "invalid" ,
39
40
params = {"value" : value },
40
41
) from None
42
+
43
+ @cached_property
44
+ def validators (self ):
45
+ # Avoid IntegerField validators.
46
+ return [* self .default_validators , * self ._validators ]
You can’t perform that action at this time.
0 commit comments