diff options
author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2021-06-01 15:11:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-01 15:11:42 +0200 |
commit | e703b152c6148ddda1b072a4353e9a41dca87f90 (patch) | |
tree | e804298a048464a86dc6a31b1b5c3de1515f2d99 /django/db/backends/mysql/operations.py | |
parent | a0410ffe8f43d8dcfbaa261e068879698fafdca3 (diff) | |
download | django-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.py | 3 |
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. |