Currently, when submitting a form, if 'some_field' isn't in the data
payload (e.g. it wasn't included in the form, perhaps because its value is
derived from another field), and 'some_field' has a default value on the
model, it cannot be overwritten with 'self.cleaned_data'.
This does not really follow the paradigm of modifying data in
'cleaned_data'. It requires the user to copy and overwrite the raw data
submitted with the form.
--
Ticket URL: <https://code.djangoproject.com/ticket/30534>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => assigned
* version: 2.2 => master
* owner: nobody => Robin (Robert) Thomas
* has_patch: 0 => 1
* type: New feature => Bug
* stage: Unreviewed => Accepted
Comment:
[https://github.com/django/django/pull/11433 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/30534#comment:1>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"aa94f7c899b98f547fc1d26797ba892c38eaf415" aa94f7c8]:
{{{
#!CommitTicketReference repository=""
revision="aa94f7c899b98f547fc1d26797ba892c38eaf415"
Fixed #30534 -- Fixed overriding a field's default in
ModelForm.cleaned_data().
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/30534#comment:2>