#32949: decimal.InvalidOperation error on DecimalField form field --------------------------------------+------------------------ Reporter: yakimka | Owner: nobody Type: Bug | Status: new Component: Forms | Version: 3.2 Severity: Normal | Keywords: Triage Stage: Unreviewed | Has patch: 1 Needs documentation: 0 | Needs tests: 0 Patch needs improvement: 0 | Easy pickings: 0 UI/UX: 0 | --------------------------------------+------------------------ I have a form with DecimalField and max_value argument:
{{{ class OrderForm(forms.ModelForm): sum = DecimalField(max_value=12) class Meta: model = Order fields = ['sum'] # model class Order(models.Model): sum = models.DecimalField( 'Sum', max_digits=18, decimal_places=2, default=0 ) }}} If I pass "NaN" value to this form it will fail with decimal.InvalidOperation error. https://github.com/django/django/pull/14645 -- Ticket URL: <https://code.djangoproject.com/ticket/32949> 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 django-updates+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/050.2e3739e1c109d60d79e6fa35efcc9c17%40djangoproject.com.