summaryrefslogtreecommitdiff
path: root/django/db/backends/mysql/operations.py
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2021-06-01 15:11:42 +0200
committerGitHub <noreply@github.com>2021-06-01 15:11:42 +0200
commite703b152c6148ddda1b072a4353e9a41dca87f90 (patch)
treee804298a048464a86dc6a31b1b5c3de1515f2d99 /django/db/backends/mysql/operations.py
parenta0410ffe8f43d8dcfbaa261e068879698fafdca3 (diff)
downloaddjango-e703b152c6148ddda1b072a4353e9a41dca87f90.tar.gz
Fixed #32793 -- Fixed loss of precision for temporal operations with DecimalFields on MySQL.
Regression in 1e38f1191de21b6e96736f58df57dfb851a28c1f. Thanks Mohsen Tamiz for the report.
Diffstat (limited to 'django/db/backends/mysql/operations.py')
-rw-r--r--django/db/backends/mysql/operations.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/django/db/backends/mysql/operations.py b/django/db/backends/mysql/operations.py
index 4faa7db617..89730cee29 100644
--- a/django/db/backends/mysql/operations.py
+++ b/django/db/backends/mysql/operations.py
@@ -160,6 +160,9 @@ class DatabaseOperations(BaseDatabaseOperations):
"""
return [(None, ("NULL", [], False))]
+ def adapt_decimalfield_value(self, value, max_digits=None, decimal_places=None):
+ return value
+
def last_executed_query(self, cursor, sql, params):
# With MySQLdb, cursor objects have an (undocumented) "_executed"
# attribute where the exact query sent to the database is saved.