Opened 14 years ago

Closed 14 years ago

Last modified 13 years ago

#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 Russell Keith-Magee)

Any changes made by model's clean method are ignored.

Sequence of calls in BaseForm.full_clean() is following:

  1. _clean_fields - which calls clean on fields and creates instance with cleaned values
  2. _clean_form - which class clean on model, assign return to form.cleaned_data but instance is not updated
  3. 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 Russell Keith-Magee, 14 years ago

Description: modified (diff)
Resolution: invalid
Status: newclosed

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).

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