#28310: (form) RangeFields should handle (None, None) better. ---------------------------------------------+------------------------ Reporter: Matthew Schinckel | Owner: nobody Type: Uncategorized | Status: new Component: Uncategorized | Version: 1.11 Severity: Normal | Keywords: Triage Stage: Unreviewed | Has patch: 0 Needs documentation: 0 | Needs tests: 0 Patch needs improvement: 0 | Easy pickings: 0 UI/UX: 0 | ---------------------------------------------+------------------------ When you clean a RangeField, and pass it in ('', ''), or (None, None), it falls through to the MultiValueField handling, which, when all values are empty, treats the cleaned value as empty.
https://github.com/django/django/blob/master/django/forms/fields.py#L992 Thus: {{{ FloatRangeField().clean([None, None]) }}} returns `None`, when it really should return FloatRange(None, None). There is a very large difference between these. -- Ticket URL: <https://code.djangoproject.com/ticket/28310> 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 post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/052.3fd1c91f81c1722abb2adf233136b9ed%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.