#12960 closed (fixed)
return value (cleaned_data) from clean() method is ignored — at Version 1
Reported by: | krejcik | Owned by: | nobody |
---|---|---|---|
Component: | Forms | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | yes |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
Any changes made by model's clean method are ignored.
Sequence of calls in BaseForm.full_clean() is following:
- _clean_fields - which calls clean on fields and creates instance with cleaned values
- _clean_form - which class clean on model, assign return to form.cleaned_data but instance is not updated
- finally save_instance(construct=False) is called (in previous version of Django model instance was created here from correct cleaned_data)
Change History (1)
comment:1 by , 15 years ago
Description: | modified (diff) |
---|---|
Resolution: | → invalid |
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Closing invalid because I can't understand what problem you are describing. You seem to be describing some sort of regression with cleaned_data handling, but then you talk about the clean method on a *model*, which suggests you mean model validation.
An example would be extremely helpful. Please reopen if you care to provide sample code, along with usage, and a description of what is happening, what should be happening (and what used to happen if this is actually a regression).