Opened 3 years ago

Closed 3 years ago

#32160 closed Bug (duplicate)

Missing formset ManagementForm data not catched by is_valid

Reported by: Claude Paroz Owned by: nobody
Component: Forms Version: dev
Severity: Normal Keywords:
Cc: Jon Dufresne Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


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.

Change History (2)

comment:1 by Carlton Gibson, 3 years ago

Cc: Jon Dufresne added

Hi Claude. Jon put in a PR this last week for #22276. Do you think this is the same issue?

comment:2 by Claude Paroz, 3 years ago

Resolution: duplicate
Status: newclosed

Ah yes, absolutely. Well found!

Note: See TracTickets for help on using tickets.
Back to Top