mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
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:
parent
a0410ffe8f
commit
e703b152c6
4 changed files with 15 additions and 1 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue