File tree Expand file tree Collapse file tree 3 files changed +20
-2
lines changed Expand file tree Collapse file tree 3 files changed +20
-2
lines changed Original file line number Diff line number Diff line change 76
76
model_fields.test_charfield
77
77
model_fields.test_floatfield
78
78
model_fields.test_textfield
79
- model_fields.test_uuid.TestAsPrimaryKey.test_update_with_related_model_instance
79
+ model_fields.test_uuid
80
80
or_lookups
81
81
82
82
docs :
Original file line number Diff line number Diff line change 2
2
3
3
4
4
class DatabaseFeatures (BaseDatabaseFeatures ):
5
+ supports_foreign_keys = False
5
6
# Not implemented: https://github.com/mongodb-labs/django-mongodb/issues/7
6
7
supports_transactions = False
7
8
uses_savepoints = False
@@ -33,6 +34,19 @@ class DatabaseFeatures(BaseDatabaseFeatures):
33
34
"model_fields.test_datetimefield.DateTimeFieldTests.test_lookup_date_without_use_tz" ,
34
35
# Empty queryset ORed (|) with another gives empty results.
35
36
"or_lookups.tests.OrLookupsTests.test_empty_in" ,
37
+ # Joins not supported.
38
+ "model_fields.test_uuid.TestAsPrimaryKey.test_two_level_foreign_keys" ,
36
39
}
37
40
38
- django_test_skips = {}
41
+ django_test_skips = {
42
+ "Pattern lookups on UUIDField are not supported." : {
43
+ "model_fields.test_uuid.TestQuerying.test_contains" ,
44
+ "model_fields.test_uuid.TestQuerying.test_endswith" ,
45
+ "model_fields.test_uuid.TestQuerying.test_filter_with_expr" ,
46
+ "model_fields.test_uuid.TestQuerying.test_icontains" ,
47
+ "model_fields.test_uuid.TestQuerying.test_iendswith" ,
48
+ "model_fields.test_uuid.TestQuerying.test_iexact" ,
49
+ "model_fields.test_uuid.TestQuerying.test_istartswith" ,
50
+ "model_fields.test_uuid.TestQuerying.test_startswith" ,
51
+ },
52
+ }
Original file line number Diff line number Diff line change 2
2
from functools import wraps
3
3
4
4
from django .db import DatabaseError , IntegrityError , NotSupportedError
5
+ from django .db .models .lookups import UUIDTextMixin
5
6
from django .db .models .query import QuerySet
6
7
from django .db .models .sql .where import OR , SubqueryConstraint
7
8
from django .utils .tree import Node
@@ -257,6 +258,9 @@ def _decode_child(self, child):
257
258
Produce arguments suitable for add_filter from a WHERE tree leaf
258
259
(a tuple).
259
260
"""
261
+ if isinstance (child , UUIDTextMixin ):
262
+ raise NotSupportedError ("Pattern lookups on UUIDField are not supported." )
263
+
260
264
rhs , rhs_params = child .process_rhs (self .compiler , self .connection )
261
265
262
266
lookup_type = child .lookup_name
You can’t perform that action at this time.
0 commit comments