Opened 5 years ago
Closed 5 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 |
Description
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 , 5 years ago
| Cc: | added |
|---|
comment:2 by , 5 years ago
| Resolution: | → duplicate |
|---|---|
| Status: | new → closed |
Ah yes, absolutely. Well found!
Note:
See TracTickets
for help on using tickets.
Hi Claude. Jon put in a PR this last week for #22276. Do you think this is the same issue?