Skip to content

Commit 1395430

Browse files
committed
ToString before regexMatch.
1 parent cbc774b commit 1395430

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

django_mongodb/features.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,9 @@ class DatabaseFeatures(BaseDatabaseFeatures):
4242
# tuple index out of range in process_rhs()
4343
"lookup.tests.LookupTests.test_exact_sliced_queryset_limit_one",
4444
"lookup.tests.LookupTests.test_exact_sliced_queryset_limit_one_offset",
45-
# Regex lookup doesn't work on non-string fields.
46-
"lookup.tests.LookupTests.test_regex_non_string",
4745
# Substr not implemented.
4846
"lookup.tests.LookupTests.test_pattern_lookups_with_substr",
49-
# Querying ObjectID with string doesn't work.
50-
"lookup.tests.LookupTests.test_lookup_int_as_str",
47+
# Regex lookup doesn't work on json fields.
5148
"model_fields.test_jsonfield.TestQuerying.test_icontains",
5249
# MongoDB gives the wrong result of log(number, base) when base is a
5350
# fractional Decimal: https://jira.mongodb.org/browse/SERVER-91223
@@ -259,7 +256,6 @@ def django_test_expected_failures(self):
259256
"db_functions.datetime.test_extract_trunc.DateFunctionTests.test_extract_year_exact_lookup",
260257
# FieldDoesNotExist with ordering.
261258
"model_fields.test_jsonfield.TestQuerying.test_ordering_grouping_by_count",
262-
"model_fields.test_jsonfield.TestQuerying.test_obj_subquery_lookup",
263259
},
264260
"Count doesn't work in QuerySet.annotate()": {
265261
"annotations.tests.AliasTests.test_alias_annotate_with_aggregation",
@@ -432,3 +428,7 @@ def django_test_expected_failures(self):
432428
"model_fields.test_jsonfield.TestQuerying.test_none_key_exclude",
433429
},
434430
}
431+
432+
@cached_property
433+
def is_mongodb_6_3(self):
434+
return self.connection.get_database_version() >= (6, 3)

0 commit comments

Comments
 (0)