#13666: Updates with F objects on decimal fields raise MySQL warnings
------------------------------------+---------------------------------------
Reporter: KyleMac | Owner: nobody
Status: reopened | Milestone:
Component: Documentation | Version: 1.2
Resolution: | Keywords:
Stage: Unreviewed | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
------------------------------------+---------------------------------------
Changes (by KyleMac):
* status: closed => reopened
* resolution: worksforme =>
Comment:
The exception I get is:
{{{
Data truncated for column 'balance' at row 1
}}}
The following raises the exception for me:
{{{
Account.objects.create(name='z1', balance='10.00')
Account.objects.filter(name__startswith='z').update(balance=F('balance')-Decimal('1.79'))
}}}
However, using "25" and "5.0" from your example does not raise an
exception. A rounding error from MySQL perhaps?
--
Ticket URL: <http://code.djangoproject.com/ticket/13666#comment:2>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.