#29007: DecimalValidator crashes on NaN, SNan, Inf, and Infinity values
-----------------------------------------+------------------------
               Reporter:  Fabio Bonelli  |          Owner:  nobody
                   Type:  Bug            |         Status:  new
              Component:  Core (Other)   |        Version:  2.0
               Severity:  Normal         |       Keywords:
           Triage Stage:  Accepted       |      Has patch:  1
    Needs documentation:  0              |    Needs tests:  0
Patch needs improvement:  0              |  Easy pickings:  0
                  UI/UX:  0              |
-----------------------------------------+------------------------
 `DecimalValidator` crashes if it receives a value like NaN, SNan, Inf, and
 Infinity.
 {{{
 >>> DecimalValidator(decimal_places=2, max_digits=10)(Decimal('NaN'))
 ...
   File "django/tests/validators/tests.py", line 322, in test_func
     validator(value)
   File "django/django/core/validators.py", line 417, in __call__
     if exponent >= 0:
 TypeError: unorderable types: str() >= int()
 }}}

 [https://github.com/django/django/pull/9082 PR]

-- 
Ticket URL: <https://code.djangoproject.com/ticket/29007>
Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/049.3e7f2dff9cb71b1c4320966f0249495d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to