Re: [Django] #7777: DecimalField validation ignores infinity and nan

3 views
Skip to first unread message

Django

unread,
Sep 14, 2017, 10:25:29 AM9/14/17
to django-...@googlegroups.com
#7777: DecimalField validation ignores infinity and nan
-------------------------------+----------------------------------------
Reporter: Farhan Ahmad | Owner: Farhan Ahmad
Type: Uncategorized | Status: closed
Component: Core (Other) | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+----------------------------------------
Changes (by Fabio Bonelli):

* ui_ux: => 0
* type: => Uncategorized
* severity: => Normal
* easy: => 0


Comment:

Looks like this is back in master:


{{{
File "/usr/local/lib/python3.5/dist-packages/django/db/models/base.py",
line 1226, in full_clean
self.clean_fields(exclude=exclude)
File "/usr/local/lib/python3.5/dist-packages/django/db/models/base.py",
line 1268, in clean_fields
setattr(self, f.attname, f.clean(raw_value, self))
File "/usr/local/lib/python3.5/dist-
packages/django/db/models/fields/__init__.py", line 603, in clean
self.run_validators(value)
File "/usr/local/lib/python3.5/dist-
packages/django/db/models/fields/__init__.py", line 555, in run_validators
v(value)
File "/usr/local/lib/python3.5/dist-packages/django/core/validators.py",
line 421, in __call__
decimals = abs(exponent)
TypeError: bad operand type for abs(): 'str'
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/7777#comment:17>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Sep 14, 2017, 1:08:10 PM9/14/17
to django-...@googlegroups.com
#7777: DecimalField validation ignores infinity and nan
-------------------------------+----------------------------------------
Reporter: Farhan Ahmad | Owner: Farhan Ahmad
Type: Uncategorized | Status: closed
Component: Core (Other) | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+----------------------------------------

Comment (by Tim Graham):

Please open a new ticket with steps to reproduce. The tests from the
original fix are still present (see
`tests/field_tests/test_decimalfield.py`) so it's most likely a different
issue.

--
Ticket URL: <https://code.djangoproject.com/ticket/7777#comment:18>

Reply all
Reply to author
Forward
0 new messages