Opened 15 years ago

Last modified 13 years ago

#12960 closed

return value (cleaned_data) from clean() method is ignored — at Initial Version

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

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 (0)

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