Fixed #32793 -- Fixed loss of precision for temporal operations with DecimalFields on MySQL.

Regression in 1e38f1191d.

Thanks Mohsen Tamiz for the report.
This commit is contained in:
Mariusz Felisiak 2021-06-01 15:11:42 +02:00 committed by GitHub
parent a0410ffe8f
commit e703b152c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 1 deletions

View file

@ -48,9 +48,10 @@ class Company(models.Model):
class Number(models.Model):
integer = models.BigIntegerField(db_column='the_integer')
float = models.FloatField(null=True, db_column='the_float')
decimal_value = models.DecimalField(max_digits=20, decimal_places=17, null=True)
def __str__(self):
return '%i, %.3f' % (self.integer, self.float)
return '%i, %.3f, %.17f' % (self.integer, self.float, self.decimal_value)
class Experiment(models.Model):