Skip to content

Commit

Permalink
use DatabaseFeatures.rounds_to_even
Browse files Browse the repository at this point in the history
  • Loading branch information
timgraham committed Dec 20, 2024
1 parent be0f9ba commit 52bceff
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions django_mongodb/features.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class DatabaseFeatures(BaseDatabaseFeatures):
greatest_least_ignores_nulls = True
has_json_object_function = False
has_native_json_field = True
rounds_to_even = True
supports_boolean_expr_in_select_clause = True
supports_collation_on_charfield = False
supports_column_check_constraints = False
Expand Down Expand Up @@ -62,8 +63,6 @@ class DatabaseFeatures(BaseDatabaseFeatures):
# Pattern lookups that use regexMatch don't work on JSONField:
# Unsupported conversion from array to string in $convert
"model_fields.test_jsonfield.TestQuerying.test_icontains",
# MongoDB gives ROUND(365, -1)=360 instead of 370 like other databases.
"db_functions.math.test_round.RoundTests.test_integer_with_negative_precision",
# Truncating in another timezone doesn't work becauase MongoDB converts
# the result back to UTC.
"db_functions.datetime.test_extract_trunc.DateFunctionWithTimeZoneTests.test_trunc_func_with_timezone",
Expand Down

0 comments on commit 52bceff

Please sign in to comment.