[Django] #32160: Missing formset ManagementForm data not catched by is_valid

4 views
Skip to first unread message

Django

unread,
Nov 1, 2020, 5:48:20 AM11/1/20
to django-...@googlegroups.com
#32160: Missing formset ManagementForm data not catched by is_valid
----------------------------------------+------------------------
Reporter: Claude Paroz | Owner: nobody
Type: Bug | Status: new
Component: Forms | Version: master
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 |
----------------------------------------+------------------------
Currently, when validating formset in its `full_clean` method, missing or
bad management form data is raising a ValidationError instead of
populating the `self._non_form_errors`.

This is problematic because we should be able to call formset.is_valid()
without fearing it raising a validation exception (and wrapping it in a
try/except clause to avoid crashes). In my opinion, is_valid() should
return False and not raise an exception.

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

Django

unread,
Nov 1, 2020, 6:44:05 AM11/1/20
to django-...@googlegroups.com
#32160: Missing formset ManagementForm data not catched by is_valid
------------------------------+--------------------------------------

Reporter: Claude Paroz | Owner: nobody
Type: Bug | Status: new
Component: Forms | Version: master
Severity: Normal | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+--------------------------------------
Changes (by Carlton Gibson):

* cc: Jon Dufresne (added)


Comment:

Hi Claude. Jon put in a [https://github.com/django/django/pull/13607 PR]
this last week for #22276. Do you think this is the same issue?

--
Ticket URL: <https://code.djangoproject.com/ticket/32160#comment:1>

Django

unread,
Nov 1, 2020, 7:53:18 AM11/1/20
to django-...@googlegroups.com
#32160: Missing formset ManagementForm data not catched by is_valid
------------------------------+--------------------------------------

Reporter: Claude Paroz | Owner: nobody
Type: Bug | Status: closed
Component: Forms | Version: master
Severity: Normal | Resolution: duplicate

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+--------------------------------------
Changes (by Claude Paroz):

* status: new => closed
* resolution: => duplicate


Comment:

Ah yes, absolutely. Well found!

--
Ticket URL: <https://code.djangoproject.com/ticket/32160#comment:2>

Reply all
Reply to author
Forward
0 new messages