#17155 closed Bug (worksforme)
ModelForm.clean() return value not applied to instance when used in a modelformset
| Reported by: | anonymous | Owned by: | nobody |
|---|---|---|---|
| Component: | Forms | Version: | dev |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
Define a form with a clean method that alters the values in self.cleaned_data before returning them. If you use the form in a modelformset, the values returned by form.clean are not applied to the model instance upon saving the formset (possibly related to #12960).
Attachments (1)
Change History (3)
comment:1 by , 14 years ago
| Resolution: | → worksforme |
|---|---|
| Status: | new → closed |
comment:2 by , 14 years ago
My sincere apologies for the time wasted. It helps to not put the field you're altering into the form's exclude.
Note:
See TracTickets
for help on using tickets.
Attached is a test that is currently passing. If you can make a test that fails, then please reopen the ticket.