Opened 7 years ago
Closed 7 years ago
#28967 closed Bug (fixed)
Cast with FloatField rounds value to integer on MySQL
Description ¶
In [6]: DurationModel.objects.annotate(f=models.functions.Cast(0.125, models.FloatField())).first().f Out[6]: 0.0 In [7]: DurationModel.objects.annotate(f=models.functions.Cast(0.5, models.FloatField())).first().f Out[7]: 1.0
Change History (4)
comment:1 by , 7 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 7 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:3 by , 7 years ago
Note:
See TracTickets
for help on using tickets.
PR